Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 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;
Comment thread
rogerbarton marked this conversation as resolved.
Outdated

namespace UnityNativeTool.Internal
{
Expand Down Expand Up @@ -139,6 +141,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());
}
Comment thread
rogerbarton marked this conversation as resolved.
}

private void DrawUsedDlls(IList<NativeDllInfo> usedDlls)
Expand Down Expand Up @@ -333,5 +341,15 @@ public static void UnloadAll()
{
DllManipulator.UnloadAll();
}

[NativeDllLoadedTrigger]
[NativeDllAfterUnloadTrigger]
public static void RepaintAll()
{
var editors = Resources.FindObjectsOfTypeAll<DllManipulatorEditor>();
if(editors == null) return;
Comment thread
mcpiroman marked this conversation as resolved.
Outdated
foreach (var editor in editors)
editor.Repaint();
}
}
}
11 changes: 10 additions & 1 deletion scripts/Editor/DllManipulatorWindowEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ namespace UnityNativeTool.Internal
{
public class DllManipulatorWindowEditor : EditorWindow
{
private static EditorWindow window;

[MenuItem("Window/Dll manipulator")]
static void Init()
{
var window = GetWindow<DllManipulatorWindowEditor>();
window = GetWindow<DllManipulatorWindowEditor>();
window.Show();
}

[NativeDllLoadedTrigger]
[NativeDllAfterUnloadTrigger]
public static void RepaintAll()
{
if(window) window.Repaint();
Comment thread
mcpiroman marked this conversation as resolved.
Outdated
}

void OnGUI()
{
var dllManipulator = FindObjectOfType<DllManipulatorScript>();
Expand Down