tuyoogame / YooAsset

unity3d resources management system
https://www.yooasset.com/
Apache License 2.0
2.41k stars 469 forks source link

2.1.1版本 使用HybridCLR热更,报错。 #298

Closed jiangjiali closed 4 months ago

jiangjiali commented 4 months ago

Exception: MissingMethodException: Default constructor not found for type YooAsset.FileGeneralRequest

System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) (at <00000000000000000000000000000000>:0) System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic, System.Boolean wrapExceptions) (at <00000000000000000000000000000000>:0) YooAsset.FileDownloader.Update () (at <00000000000000000000000000000000>:0) YooAsset.DownloadManager.Update () (at <00000000000000000000000000000000>:0) YooAsset.YooAssets.Update () (at <00000000000000000000000000000000>:0)

jiangjiali commented 4 months ago

由于 YooAsset 的代码裁剪问题。在Unity上代码裁剪改为 Low 可以解决问题。

iamfrankjie commented 4 months ago

low还会出现这个问题的话,在link.xml里加上 <assembly fullname="YooAsset" preserve="all">

jiangjiali commented 4 months ago

low还会出现这个问题的话,在link.xml里加上 <assembly fullname="YooAsset" preserve="all">

我这里没有出现问题了。不知道你遇到的是不是其他原因。

jiangjiali commented 4 months ago

会不会你没有通过 HybridCLR 去自动生成 link.xml 文件。并配置好HybridCLR相关设置。