|
|
|
|
|
|
{ |
|
|
|
#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>
|
|
|
|