Beispiel #1
0
 void ResetManager()
 {
     if (GUILayout.Button("Reset Manager", skin.button, GUILayout.Height(45)))
     {
         OptionsCreator = null;
     }
 }
Beispiel #2
0
        static void InitCreator()
        {
            if (OptionsCreator == null)
            {
                OptionsCreator = FindObjectOfType <TPOptionsCreator>();

                if (OptionsCreator != null)
                {
                    UpdateManager();
                }
            }
        }
Beispiel #3
0
        void InitializeManager()
        {
            if (GUILayout.Button("Initialize New Manager", skin.button, GUILayout.Height(60)))
            {
                GameObject go = (new GameObject("TP_OptionsManager", typeof(TPOptionsCreator)));
                OptionsCreator = go.GetComponent <TPOptionsCreator>();
                UpdateManager();
                Debug.Log("Options Manager created!");
            }

            if (GUILayout.Button("Initialize Exist Manager", skin.button, GUILayout.Height(60)))
            {
                existManager = !existManager;
            }

            if (existManager)
            {
                OptionsCreator = EditorGUILayout.ObjectField(OptionsCreator, typeof(TPOptionsCreator), true,
                                                             GUILayout.Height(30)) as TPOptionsCreator;
            }
        }