Пример #1
0
        private static WaypointEditorState GetInstance()
        {
            if (!_instance)
            {
                try
                {
                    //gets the Scriptable object instance asset in the Assets folder.
                    _instance = Resources.LoadAll <WaypointEditorState>("").First();
                }
                catch (Exception)
                {
                    Debug.LogError("No WaypointEditorState !");
                }
            }

            if (_instance._isActive)
            {
                WaypointEditorWindow.Enable();
            }

            return(_instance);
        }
Пример #2
0
 public static void Enable()
 {
     GetInstance()._isActive = true;
     EditorUtility.SetDirty(GetInstance());
     WaypointEditorWindow.Enable();
 }