mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
toolbar拓展布局自适应优化,以及场景切换分组:初始场景、默认包、其他场景。
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using UnityEditor;
|
||||
using UnityToolbarExtender;
|
||||
|
||||
namespace TEngine
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public partial class UnityToolbarExtenderRight
|
||||
{
|
||||
|
||||
static UnityToolbarExtenderRight()
|
||||
{
|
||||
// 添加自定义按钮到右上工具栏
|
||||
ToolbarExtender.RightToolbarGUI.Add(OnToolbarGUI_SceneSwitch);
|
||||
// 订阅项目变化事件
|
||||
EditorApplication.projectChanged += UpdateScenes;
|
||||
UpdateScenes();
|
||||
ToolbarExtender.RightToolbarGUI.Add(OnToolbarGUI_EditorPlayMode);
|
||||
_resourceModeIndex = EditorPrefs.GetInt("EditorPlayMode", 0);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user