Esempio n. 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);
        }
Esempio n. 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);
        }