2022-07-19 16:48:43.374 29607-29690/? W/Unity: unhandledRejection,Error: c# exception:IL2CPP does not support marshaling delegates that point to generic methods. The generic method we're attemping to marshal is: PuertsStaticWrap.System_Collections_Generic_List_1_T__Wrap`1[[SweetSugar.Scripts.TargetScripts.TargetSystem.DropProbabilityContainer, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::Constructor,stack: at Puerts.PuertsDLL.RegisterClass (System.IntPtr isolate, System.Int32 BaseTypeId, System.String fullName, Puerts.V8ConstructorCallback constructor, Puerts.V8DestructorCallback destructor, System.Int64 data) [0x00000] in <00000000000000000000000000000000>:0
at Puerts.TypeRegister.RegisterType (System.IntPtr isolate, System.Type type, System.Boolean includeNoPublic) [0x00000] in <00000000000000000000000000000000>:0
at Puerts.TypeRegister.GetTypeId (System.IntPtr isolate, System.Type type, System.Boolean& isFirst) [0x00000] in <00000000000000000000000000000000>:0
at Puerts.TypeRegister.GetTypeId (System.IntPtr isola
static IEnumerable<Type> Bindings
{
get
{
var list = new List<Type>()
{
typeof(System.Collections.Generic.List<SweetSugar.Scripts.TargetScripts.TargetSystem.DropProbabilityContainer>),
error log | 日志或报错信息
2022-07-19 16:48:43.374 29607-29690/? W/Unity: unhandledRejection,Error: c# exception:IL2CPP does not support marshaling delegates that point to generic methods. The generic method we're attemping to marshal is: PuertsStaticWrap.System_Collections_Generic_List_1_T__Wrap`1[[SweetSugar.Scripts.TargetScripts.TargetSystem.DropProbabilityContainer, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::Constructor,stack: at Puerts.PuertsDLL.RegisterClass (System.IntPtr isolate, System.Int32 BaseTypeId, System.String fullName, Puerts.V8ConstructorCallback constructor, Puerts.V8DestructorCallback destructor, System.Int64 data) [0x00000] in <00000000000000000000000000000000>:0 at Puerts.TypeRegister.RegisterType (System.IntPtr isolate, System.Type type, System.Boolean includeNoPublic) [0x00000] in <00000000000000000000000000000000>:0 at Puerts.TypeRegister.GetTypeId (System.IntPtr isolate, System.Type type, System.Boolean& isFirst) [0x00000] in <00000000000000000000000000000000>:0 at Puerts.TypeRegister.GetTypeId (System.IntPtr isola
context | 编译/运行环境
Unity2018.4.36f android studio编译,真机华为手机运行
how to reproduce | 复现步骤
1.升级到最新版Puerts,使用Unity重新导出绑定TS类; 2.在puertconfig里面声明导出类,SweetSugar.Scripts.TargetScripts.TargetSystem.DropProbabilityContainer,为自定义C#类 puertconfig里面声明:
3.也添加了UsingAction声明: jsEnv.UsingAction();
4.然后在TS里面调用这个C#List的时候就报错。
more | 其他
必现