Пример #1
0
        public void ToScriptableObject()
        {
            DebugSettings ds = DebugSettings.FromXML(this.ToXML());

            string filename = "Profile_" + ds.profileName;

            if (!AssetDatabase.IsValidFolder("Assets/DebugTools/Profiles"))
            {
                AssetDatabase.CreateFolder("Assets/DebugTools", "Profiles");
            }

            AssetDatabase.CreateAsset(ds, "Assets/DebugTools/Profiles/" + filename + ".asset");
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            EditorGUIUtility.PingObject(ds);
        }
Пример #2
0
        private void LoadConfig()
        {
            if (settings == null)
            {
                string xml = "";

                if (LoadSettingsFile(out xml) && xml != "")
                {
                    settings = DebugSettings.FromXML(xml);
                }
                else
                {
                    settings = new DebugSettings();
                }
            }

            Assert.IsNotNull(settings);
        }