feat(ui): 添加录制工具面板
新增 RecordingToolPanel,按 Ctrl+R 唤出侧边栏,可独立控制光标、 版本号、Top Bar 与对话视觉的显隐。移除旧的 UIEventEnum.RecordingModeChanged 事件,改为各子系统提供显式 SetVisible API。在 Persistence 场景中配置面板层级与四个开关。
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using AibisDream.Framework;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -9,17 +8,11 @@ namespace AibisDream.Kit
|
||||
private void Start()
|
||||
{
|
||||
GetComponent<TMP_Text>().text = $"Ver.{Application.version}";
|
||||
EnumEventSystem.Global.Register<UIEventEnum, bool>(UIEventEnum.RecordingModeChanged, OnRecordingModeChanged);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
public void SetVisible(bool visible)
|
||||
{
|
||||
EnumEventSystem.Global.UnRegister<UIEventEnum, bool>(UIEventEnum.RecordingModeChanged, OnRecordingModeChanged);
|
||||
}
|
||||
|
||||
private void OnRecordingModeChanged(bool isRecording)
|
||||
{
|
||||
gameObject.SetActive(!isRecording);
|
||||
gameObject.SetActive(visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user