杨必赞
杨必赞
FAQ那段说的是C#调用ts的情况,你这是ts调用C# 泛型函数是可以调用的,参见$genericMethod方法(从test里找一下例子),但它同样也受ILCPP的AOT限制。因此目前最佳实践还是写一个adaptor函数给ts用
https://gitee.com/puerts/puerts/issues/I5PX87 本Issue中文描述在gitee上且开启了悬赏(尝试一下)
https://gitee.com/puerts/puerts/issues/I5PX83 本Issue中文描述在gitee上且开启了悬赏(尝试一下)
aef231537231acbf654bb79178c8197966b727fc 97726b781001d09d33223fc3d7c2d111d0254276 6f48390b095a471f4f531d5b914a124e1ec3afed
https://github.com/Tencent/puerts/commit/fdd260b9c8b14aeba7ea0dbe284d6e7ccbb23dc5 看看是不是这个修的问题。 另外你截图的JS栈是drawDots,在往上也没有出现Raycast,有没有可能不是Raycast产生的问题
这个ContactEventDelegate是怎么触发的?看上去RayCast不会用到 我测试了一下RayCast也没事(返回false) ``` jsEnv = new JsEnv(); RaycastHit rh; UnityEngine.Physics.Raycast( new UnityEngine.Vector3(0, 0, 0), UnityEngine.Vector3.down, out rh ); jsEnv.Eval(@" const hitInfo = puer.$ref(null); console.log(CS.UnityEngine.Physics.Raycast( new CS.UnityEngine.Vector3(0, 0, 0), CS.UnityEngine.Vector3.down, hitInfo...
``` try load type throw System.Exception: create TypeInfo for UnityEngine.Physics+ContactEventDelegate fail. maybe the BridgeInfo is not found, try to regenerate the FunctionBridge.Gen.h at Puerts.TypeMapping.TypeRegister.Register (System.Type type, System.Reflection.MethodBase[] ctors, System.Reflection.MethodBase[] methods,...
ContactEventDelegate所用到的`NativeArray.ReadOnly`在Runtime和Editor下获得的字段不同,Runtime下没有`m_Safety`属性
https://github.com/Tencent/puerts/blob/master/unity/Assets/core/upm/Runtime/Resources/puerts/csharp.mjs#L61 目前发现是这里触发的,GetNestType时触发了RegisterType。这条链路还没法被Filter过滤。快捷点的话只能先在这里手动if过滤一下
现在仓库上是带有M1版本的binary的,如果你使用的版本低于2021,Unity可能不识别这个binary的配置,并且将它优先打包了进去。造成DLLNotFound 如果确认你的Unity低于2021,可以直接删掉arm64目录的dylib