Skip to content

Commit

Permalink
Editor variable changes saved properly
Browse files Browse the repository at this point in the history
Before changing a variable would not be detected and so not saved/serialized in some cases.
  • Loading branch information
rogerbarton committed Mar 21, 2020
1 parent 1d497da commit 270c46a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/Editor/DllManipulatorEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#endif
using System.IO;
using System;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;

namespace UnityNativeTool.Internal
{
Expand Down Expand Up @@ -143,6 +145,12 @@ public override void OnInspectorGUI()
var time = t.InitializationTime.Value;
EditorGUILayout.LabelField($"Initialized in: {(int)time.TotalSeconds}.{time.Milliseconds.ToString("D3")}s");
}

if (GUI.changed)
{
EditorUtility.SetDirty(target);
EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
}
}

private void DrawUsedDlls(IList<NativeDllInfo> usedDlls)
Expand Down

0 comments on commit 270c46a

Please sign in to comment.