Skip to content

Commit 0bd07e0

Browse files
committed
* 更新libScriptEngine.a ,加载默认Code.dll
1 parent a63eb71 commit 0bd07e0

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

DemoProject/Assets/Scripts/TestEntry/MonoEntry.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,18 @@ public static void Main()
2020

2121
static void TestLoadAssembly()
2222
{
23-
var dllPath = Application.persistentDataPath + $"/Managed/{StartInfo.ReloadDllName}";
24-
if(File.Exists(dllPath))
23+
var dllName = StartInfo.ReloadDllName;
24+
var dllPath = Application.persistentDataPath + $"/Managed/{dllName}";
25+
26+
Assembly assembly = null;
27+
28+
if (File.Exists(dllPath))
29+
assembly = Assembly.LoadFrom(dllPath);
30+
else
31+
assembly = Assembly.Load(dllName);
32+
33+
if (assembly != null)
2534
{
26-
Assembly assembly = Assembly.LoadFrom(dllPath);
2735
Type type = assembly.GetType(StartInfo.ReloadClassName);
2836
MethodInfo mi = type.GetMethod(StartInfo.TestMethodName);
2937
var res = mi.Invoke(null, new object[] {"hello"});

ScriptEngine/lib/libScriptEngine.a

-6.86 KB
Binary file not shown.

0 commit comments

Comments
 (0)