PolySpatial v1.2.3 fails to load meshes with indices length > 65536 and crashes

Unfortunately, the latest update to PolySpatial completely broke my use case for my app with loading meshes that have indices greater than 65536. I am currently stuck using PolySpatial 1.1.6 because of this.

Now, using simplified meshes is not an acceptable solution for the app I am building. What changed in version 1.2.3 that broke this? I didn’t see anything in the Changelog that suggested this new limitation.

Any assistance, guidance, or understanding on this is greatly appreciated. Thanks!

This shouldn’t be a limitation, AFAIK. We regularly use meshes with more than 64k indices, provided that the indexFormat is UInt32. If you can submit a repro case as a bug report and let us know the incident number (IN-#####), we can look into what might be going wrong in your case.

I am using TriLib 2 as an asset to load FBX files dynamically and I did specify to use the IndexFormat of UInt32. It is still giving me this error:

[Platform] Trying to use mesh 7f9f9f3f-aa13-473d-9aef-758dad57f524 with more than 65535 indices. Not supported.

I’m not sure where to submit a reproduction case as a bug report. If anyone can guide me on that, I would appreciate it. It is frustrating to stay stuck on PolySpatial 1.1.6.

You should be able to follow the instructions here.

However, I didn’t realize in my last message that the error you’re seeing is coming from our code when you attempt to create a non-convex static mesh collider. When you do that, we use Apple’s .generateStaticMesh to create the RealityKit equivalent, and apparently Apple has a limit of 64k indices there. I’d suggest asking them via the Feedback Assistant to remove that limit, but until they do, you will either have to split the mesh up into smaller meshes or use convex colliders instead.

I submitted a Unity bug report documenting my findings and setup. I have contacted both the developer of TriLib 2 and Apple via Feedback Assistant about this issue.

The FBX mesh I am trying to load dynamically has an indices count of around 17000-18000 so I am perplexed on why this (Trying to use mesh 7f9f9f3f-aa13-473d-9aef-758dad57f524 with more than 65535 indices. Not supported.) error would occur in PolySpatial 1.2.3. I don’t understand why a mesh collider with over 65535 indices would be generated from a mesh that has a little more than a 1/3 of the allotted limit.