Skip to content

Commit d04836e

Browse files
committed
* editor demo
1 parent 232ae7e commit d04836e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

DemoProject/Assets/Scripts/Lancher/Lancher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void OnGUI()
3838
if (GUI.Button(new Rect(20,80,120,70),"Start"))
3939
{
4040
#if UNITY_EDITOR
41-
//MonoEntry.Main();
41+
MonoEntry.Main();
4242
#else
4343
ScriptEngine.Setup(reloadDir, "TestEntry.dll");
4444

DemoProject/Assets/Scripts/TestEntry/MonoEntry.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@ public static void Main()
1818
TestLoadAssembly();
1919
}
2020

21+
22+
2123
static void TestLoadAssembly()
2224
{
2325
var dllName = StartInfo.ReloadDllName;
2426
var dllPath = Application.persistentDataPath + $"/Managed/{dllName}";
2527

28+
#if UNITY_EDITOR
29+
var path = typeof(MonoEntry).Assembly.Location;
30+
dllPath = Path.Combine(Path.GetDirectoryName(path), StartInfo.ReloadDllName);
31+
#endif
32+
2633
Assembly assembly = null;
2734

2835
if (File.Exists(dllPath))

0 commit comments

Comments
 (0)