public override void OnInspectorGUI() { if (!Application.isPlaying) { if (m_scene.SceneName == string.Empty) { EditorGUILayout.HelpBox("Please firstly save the scenes", MessageType.Error); } else { var scnData = SceneData.GetBySceneName(m_scene.SceneName); var sceneExist = scnData != null; var defaultColor = GUI.color; GUI.color = (sceneExist) ? defaultColor : new Color(1f, 0.5f, 0.3f); if (GUILayout.Button("Manage Setting Data")) { CreateScenePopupWindow.ShowWindow(m_scene); } GUI.color = defaultColor; var deviceType = SceneDetail.GetBySceneName(m_scene.SceneName).deviceType; EditorGUILayout.LabelField("Device Type", deviceType); } } base.OnInspectorGUI(); }
public void Init(TGBaseScene _scene) { m_scene = _scene; m_prevSceneData = m_newSceneData = SceneData.GetBySceneName(m_scene.SceneName); m_prevSceneDetail = m_newSceneDetail = SceneDetail.GetBySceneName(m_scene.SceneName); }