浏览代码

Updated GameSceneEditor class

/main
Carlos Eduardo Pérez 4 年前
当前提交
08176b7d
共有 1 个文件被更改,包括 19 次插入4 次删除
  1. 23
      UOP1_Project/Assets/Scripts/Editor/GameSceneEditor.cs

23
UOP1_Project/Assets/Scripts/Editor/GameSceneEditor.cs


{
#region UI_Warnings
private string noScenesWarning = "There are no scenes set for this level yet! Add a new scene with the dropdown above";
private const string noScenesWarning = "There are no scenes set for this level yet! Add a new scene with the dropdown above";
#region GUI_Styles
private GUIStyle headerLabelStyle;
#endregion
// it holds a list of properties to hide from basic inspector
private static readonly string[] ExcludedProperties = {"m_Script", "sceneName"};

private void OnEnable()
{
gameSceneTarget = target as GameScene;
PopulateScenePicker();
InitializeGuiStyles();
PopulateScenePicker();
EditorGUILayout.LabelField("Scene information", new GUIStyle(EditorStyles.largeLabel) {fontStyle = FontStyle.Bold,
fontSize = 18, fixedHeight = 70.0f});
EditorGUILayout.LabelField("Scene information", headerLabelStyle);
EditorGUILayout.Space();
DrawScenePicker();
DrawPropertiesExcluding(serializedObject, ExcludedProperties);

{
EditorGUILayout.HelpBox(noScenesWarning, MessageType.Warning);
}
}
private void InitializeGuiStyles()
{
headerLabelStyle = new GUIStyle(EditorStyles.largeLabel)
{
fontStyle = FontStyle.Bold,
fontSize = 18, fixedHeight = 70.0f
};
}
/// <summary>

正在加载...
取消
保存