Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
pirunxi committed May 29, 2024
1 parent 6effa4c commit 82b5bb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/help/commonerrors.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ HybridCLR提供了快捷的自动生成工具,运行菜单命令 `HybridCLR/Ge
有几个原因:

1. 这是因为AOT泛型函数实例化缺失引起的
2. 使用了Unity 2021并且 `Il2Cpp Code Generation` 选项为 `faster runtime`,导致生成的代码为完全泛型模式,所有泛型函数签名均发生变化。如果没有补充元数据,调用即使已经在AOT中实例化的泛型函数,仍然会出现这个错误。
2. 使用了Unity 2021并且 `Il2Cpp Code Generation` 选项为 `faster (smaller) build`,导致生成的代码为完全泛型模式,所有泛型函数签名均发生变化。如果没有补充元数据,调用即使已经在AOT中实例化的泛型函数,仍然会出现这个错误。
3. 微信小游戏转换工具,默认会将IL2CPP Code Generation设置为Faster(Smaller) builds模式,如果未补充元数据,会导致无法访问AOT泛型函数。

原因1的解决办法为:
Expand All @@ -323,7 +323,7 @@ HybridCLR提供了快捷的自动生成工具,运行菜单命令 `HybridCLR/Ge

原因2的解决办法为:

- 使用补充元数据技术
- 将BuildSettings中 `IL2CPP Code Generation` 设置为 `Faster runtime`同时使用补充元数据

原因3的解决办法:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ This is a function loss caused by unity code cutting. Run the menu command `Hybr
There are several reasons:

1. This is caused by the lack of instantiation of the AOT generic function
2. Unity 2021 is used and the `Il2Cpp Code Generation` option is `faster runtime`, causing the generated code to be fully generic mode, and all generic function signatures have changed. Without supplementary metadata, this error will still occur when calling a generic function that has been instantiated in AOT.
2. Unity 2021 is used and the `Il2Cpp Code Generation` option is `faster (smaller build)`, causing the generated code to be fully generic mode, and all generic function signatures have changed. Without supplementary metadata, this error will still occur when calling a generic function that has been instantiated in AOT.
3. The WeChat mini game conversion tool will set IL2CPP Code Generation to Faster (Smaller) builds mode by default. If metadata is not supplemented, AOT generic functions will not be accessible.

The solution to reason 1 is:
Expand All @@ -315,12 +315,12 @@ The solution to reason 1 is:

The solution to reason 2 is:

- Use supplementary metadata technology
- set `IL2CPP Code Generation` in BuildSettings to `Faster` and Use supplementary metadata technology

Solution to reason 3:

- Use supplementary metadata technology
- Change the WeChat tool source code yourself and set `IL2CPP Code Generation` in BuildSettings to `Faster`.
- Change the WeChat tool source code yourself and set `IL2CPP Code Generation` in BuildSettings to `Faster runtime`.


For specific operations, please see the [Introduction to AOT Generic Principles](/basic/aotgeneric.md) document.
Expand Down

0 comments on commit 82b5bb4

Please sign in to comment.