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); }
private void LoadConfig() { if (settings == null) { string xml = ""; if (LoadSettingsFile(out xml) && xml != "") { settings = DebugSettings.FromXML(xml); } else { settings = new DebugSettings(); } } Assert.IsNotNull(settings); }