Skip to content

Commit 1baa4a5

Browse files
committed
Editor variable changes saved properly
Before changing a variable would not be detected and so not saved/serialized in some cases.
1 parent 05ba662 commit 1baa4a5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/Editor/DllManipulatorEditor.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#endif
99
using System.IO;
1010
using System;
11+
using UnityEditor.SceneManagement;
12+
using UnityEngine.SceneManagement;
1113

1214
namespace UnityNativeTool.Internal
1315
{
@@ -139,6 +141,12 @@ public override void OnInspectorGUI()
139141
var time = t.InitializationTime.Value;
140142
EditorGUILayout.LabelField($"Initialized in: {(int)time.TotalSeconds}.{time.Milliseconds.ToString("D3")}s");
141143
}
144+
145+
if (GUI.changed)
146+
{
147+
EditorUtility.SetDirty(target);
148+
EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
149+
}
142150
}
143151

144152
private void DrawUsedDlls(IList<NativeDllInfo> usedDlls)

0 commit comments

Comments
 (0)