在热更新ILRuntime中使用了GList.itemRenderer,Unity编辑器 运行提示错误
KeyNotFoundException: Cannot find convertor for FairyGUI.ListItemProvider

在Unity项目中ILRuntimeWrapper.cs的void RegistDelegate()函数中添加 下面这段代码
appdomain.DelegateManager.RegisterDelegateConvertor<FairyGUI.ListItemProvider>((act) =>
{
return new FairyGUI.ListItemProvider((index) =>
{
return ((Func<System.Int32, System.String>)act)(index);
});
});
Unity编辑器 运行提示错误,报错提示
KeyNotFoundException: Cannot find Delegate Adapter for:uicreatetroops.GetListItemResource(Int32 index), Please add following code:
appdomain.DelegateManager.RegisterFunctionDelegate<System.Int32, System.String>();

在Unity项目使用FairyGUI和ILRuntime进行热更新时,遇到在ILRuntimeWrapper.cs的RegistDelegate()函数中添加GList.itemRenderer代码导致的错误。错误提示需要确认代码正确插入,并探讨了如何在GList中添加不同类型的对象和设置默认遍历事件。
最低0.47元/天 解锁文章
3034

被折叠的 条评论
为什么被折叠?



