Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
pirunxi committed Dec 19, 2023
1 parent bd5fb47 commit 4fe2a69
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/basic/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Installer会安装配置中指定的版本,不再支持自定义待安装的

如果你想安装其他版本的hybridclr或il2cpp_plus,修改该配置文件中的branch和hash即可。直接点击`安装`完成安装。安装成功后,控制台会打印`安装成功`日志。

### 如果你的package版本 <= 1.1.19
### 如果你的package版本 &ge; 1.1.19

填写你要安装的hybridclr和il2cpp_plus仓库的 commit id或branch或tag。如果hybridclr的版本号留空,则安装hybridclr仓库main分支的最新版本。
如果il2cpp_plus的版本号留空,则安装相应年度版本主分支(如2020-main)的最新版本。
Expand Down
2 changes: 2 additions & 0 deletions docs/business/pro/commonerrors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 常见问题

9 changes: 9 additions & 0 deletions docs/business/reload/commonerrors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 常见问题


## Json序列化的问题

程序集卸载后,会卸载所有类型元数据。而几乎所有常用的序列化库都会缓存类型的反射信息,这意味着如果你在代码中使用了Unity的JsonUtility或者LitJson之类的
序列库,它们会错误地缓存反射信息,导致你第二次(或者第三次)重新加载,并且反序列化时,会出错。

解决办法为,修改这些反序列化库的代码,在卸载程序集后,清空它们的反射缓存。像Unity的JsonUtility是native实现,无法清空缓存,只能更换为其他Json库。
2 changes: 0 additions & 2 deletions docs/business/reload/hotreloadassembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
- 由于Unity自身实现的原因,与2022的Jobs不兼容,需要自行小幅修改UnityEngine.CoreModule.dll的代码。 2020-2021仍然可以正常工作
- 不支持析构函数,~XXX()。也不允许实例化泛型参数带本程序集类型的带析构函数的泛型类

## 一些较佳实践

- 热重载程序集的MonoBehaviour的类型名上加版本号,一旦特殊函数(如Awake)发生增删或者字段发生增删或改名,则版本号+1



2 changes: 2 additions & 0 deletions docs/business/ultimate/commonerrors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 常见问题

3 changes: 3 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const sidebars = {
'business/ultimate/intro',
'business/ultimate/quickstart',
'business/ultimate/manual',
'business/ultimate/commonerrors',
],
},
{
Expand All @@ -117,6 +118,7 @@ const sidebars = {
items: [
'business/pro/intro',
'business/pro/quickstart',
'business/pro/commonerrors',
],
},
{
Expand All @@ -132,6 +134,7 @@ const sidebars = {
'business/reload/quickstart',
'business/reload/hotreloadassembly',
'business/reload/modifydll',
'business/reload/commonerrors',
],
},
],
Expand Down

0 comments on commit 4fe2a69

Please sign in to comment.