File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
# PureScript
2
2
3
- [ ![ license] ( http://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/loongly/PureScript/blob/master/LICENSE )
4
- [ ![ PRs Welcome] ( https://img.shields.io/badge/PRs-welcome-blue.svg )] ( https://github.com/loongly/PureScript/pulls )
3
+ [ ![ license] ( http://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/loongly/PureScript/blob/master/LICENSE ) [ ![ PRs Welcome] ( https://img.shields.io/badge/PRs-welcome-blue.svg )] ( https://github.com/loongly/PureScript/pulls )
5
4
6
5
7
6
一个支持Unity3D的C#热更框架,基于Mono的[ MONO_AOT_MODE_INTERP] ( https://www.mono-project.com/news/2017/11/13/mono-interpreter/ ) 模式。
45
44
以下两段代码是等效的,详细参考DemoProject/* /MonoEntry.cs。
46
45
47
46
ScriptEngine.Setup(reloadDir, "TestEntry.dll");
48
-
47
+
49
48
// equal to:
50
-
49
+
51
50
Assembly assembly = Assembly.Load("TestEntry.dll");
52
51
Type type = assembly.GetType("MonoEntry");
53
52
MethodInfo mi = type.GetMethod("Main");
54
53
var res = mi.Invoke(null, null)
55
54
55
+ ` 注意 ` 需要热更新的程序集如果是Unity自动生成的工程,会自动引用一堆的无用dll,比如UntiyEditor* .dll,和一堆根本不会用到的System* .dll ,因为安装包内并没有带上这些,加载会失败。这时需要手动删掉这些用不到的引用。或者再建一个工程,手动管理引用,后面也可以考虑做自动化工具,strip掉没用的引用。
56
+
56
57
--------------------------------------------
57
58
58
59
## 实现
You can’t perform that action at this time.
0 commit comments