Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Fix saving settings
Browse files Browse the repository at this point in the history
- Mark the settings object as dirty so it actually saves correctly.
  • Loading branch information
MerlinVR committed Mar 16, 2020
1 parent 1208725 commit 1da3c80
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assets/UdonSharp/Editor/Editors/UdonSharpSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ public static SettingsProvider CreateSettingsProvider()
EditorGUILayout.PropertyField(settings.FindProperty("newScriptTemplateOverride"), templateOverrideLabel);
if (EditorGUI.EndChangeCheck())
{
settings.ApplyModifiedProperties();
EditorUtility.SetDirty(UdonSharpSettingsObject.GetOrCreateSettings());
}
},
};

Expand Down
16 changes: 16 additions & 0 deletions Assets/UdonSharp/UdonSharpSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 0}
m_Name: UdonSharpSettings
m_EditorClassIdentifier: UdonSharp.Editor:UdonSharp:UdonSharpSettingsObject
autoCompileOnModify: 1
newScriptTemplateOverride: {fileID: 0}
8 changes: 8 additions & 0 deletions Assets/UdonSharp/UdonSharpSettings.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1da3c80

Please sign in to comment.