[unity] [fairygui] [ilruntime] Hot update error prompt add automatic code glist.itemextender problem

Glist.itemextender is used in the hot update ilruntime, and the unity editor will run with an error

KeyNotFoundException: Cannot find convertor for FairyGUI.ListItemProvider

Add the following code to the void registdelegate() function of ilruntimewrapper. CS in the unity project

appdomain.DelegateManager.RegisterDelegateConvertor<FairyGUI.ListItemProvider>((act) =>
{
    return new FairyGUI.ListItemProvider((index) =>
    {
        return ((Func<System.Int32, System.String>)act)(index);
    });
});

Unity editor running error, error prompt

KeyNotFoundException: Cannot find Delegate Adapter for:uicreatetroops.GetListItemResource(Int32 index), Please add following code:
appdomain.DelegateManager.RegisterFunctionDelegate<System.Int32, System.String>();

  Add the following code to the void registdelegate() function of ilruntimewrapper. CS in the unity project

appdomain.DelegateManager.RegisterFunctionDelegate<System.Int32, System.String>();

Make sure it is

Add the following code to the void registdelegate() function of ilruntimewrapper. CS in the unity project

...
void RegistDelegate()
{
...
        appdomain.DelegateManager.RegisterDelegateConvertor<FairyGUI.ListItemProvider>((act) =>
        {
            return new FairyGUI.ListItemProvider((index) =>
            {
                return ((System.Func<System.Int32, System.String>)act)(index);
            });
        });
        
        appdomain.DelegateManager.RegisterFunctionDelegate<System.Int32, System.String>();
...
}
...

Hot update ilruntime automatic error generation code…

Read More: