[CASE IN-83742]Polyspatial Crashed when setting IL2CPP Code Generation to Faster(Small)Builds

Hi,

When setting IL2CPP Code Generation to Faster (Small) builds, opening Raycast target for UGUI objects, and setting Rendering Path in Render Pipline to Forward +, loading from assetbundle and instantiating UGUI GameObject, the application crashes at this moment.

  • Faster(Small)Builds
  • Turn on UGUI’s Raycast target
  • loading from assetbundle and instantiating

Report case id: CASE IN-83742

Unity 6 pre.17
Polyspatial 2.0.1-pre.11
visionOS 2-b8

Crash information

[Platform] Entity 0 not found
PolySpatialRealityKit/PolySpatialImplUtils.swift:52: Fatal error: Entity 0 not found
Can't show file for stack frame : <DBGLLDBStackFrame: 0x32d10a970> - stackNumber:4 - name:PolySpatialRealityKit.GetEntity(_:) [inlined]. The file path does not exist on the file system: /Users/bokken/build/output/unity/quantum/Packages/com.unity.polyspatial.visionos/Source~/PolySpatialRealityKit/PolySpatialRealityKit/PolySpatialImplUtils.swift

Best,
NSWell

Thanks for the report! I will check it out shortly.

Looks like this doesn’t have anything to do with asset bundles per se (and definitely nothing to do with the render pipeline settings, which are totally ignored by PolySpatial); the “Faster (smaller) builds” setting changes the way that one of the collections structs that we use (NativeList) works, causing a misalignment issue. Shouldn’t be hard to fix, but in the meantime, it’s probably better to stick with the default IL2CPP (“Faster runtime”) setting.

Thank you for your replay and tell us the reason.