修改工具栏切换场景布局

This commit is contained in:
XiaoBojun
2025-03-26 00:23:18 +08:00
parent e37c066f9f
commit 8f5b1b2117
2 changed files with 5 additions and 9 deletions

View File

@@ -67,10 +67,8 @@ namespace TEngine
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
{
// GUILayout.Label("资源加载模式:",ToolbarStyles.ToolBarTextStyle);
GUILayout.Space(10);
GUILayout.FlexibleSpace();
//GUILayout.Space(10);
//GUILayout.FlexibleSpace();
// 资源模式
int selectedIndex = EditorGUILayout.Popup("", _resourceModeIndex, _resourceModeNames, ToolbarStyles.ToolBarButtonGuiStyle);
@@ -81,10 +79,8 @@ namespace TEngine
_resourceModeIndex = selectedIndex;
EditorPrefs.SetInt("EditorPlayMode", selectedIndex);
}
GUILayout.FlexibleSpace();
GUILayout.Space(400);
//GUILayout.FlexibleSpace();
//GUILayout.Space(400);
}
EditorGUI.EndDisabledGroup();
}

View File

@@ -45,7 +45,7 @@ namespace UnityToolbarExtender.Examples
var size = EditorStyles.popup.CalcSize(new GUIContent(m_SceneName[sceneSelected]));
// 创建水平布局
//EditorGUILayout.BeginHorizontal();
GUILayout.Space(20);
// 将控件推到左边和右边
//GUILayout.FlexibleSpace(); // 先占用左边的所有空间
EditorGUILayout.LabelField("当前场景:", GUILayout.Width(55));