private static MyBoxSettings CreateNewSettings()
        {
            _instance = CreateInstance <MyBoxSettings>();
            Save();

            return(_instance);
        }
Example #2
0
        private static MyBoxSettings LoadSettings()
        {
            MyBoxSettings settingsInstance = new MyBoxSettings();

            try
            {
                settingsInstance = (MyBoxSettings)UnityEditorInternal.InternalEditorUtility.LoadSerializedFileAndForget(Path)[0];
            }
            catch (Exception ex)
            {
                //Debug.LogError("Unable to read MyBoxSettings, set to defaults" + ex);
                settingsInstance = null;
            }

            return(settingsInstance);
        }