title: How to access the 3D model parts from the code
body: <p>I am working on RealityKit app project and trying to access a 3D model mesh parts to change their color or to add texture to a specific part of it,
  I am using usdz and obj format</p>
  <p>I tried this code but I get a runtime error</p>
  <pre><code>//bring Object from files
      
          let model = try! ModelEntity.loadModel(named: &quot;frog.usdz&quot;)
          let anchorEntity = AnchorEntity(plane: .any)
          anchorEntity.addChild(model)
          print(&quot;Model is \(anchorEntity.children[0].components[ModelComponent]!)&quot;)
  
        //  let modelEntity = model.children[0] as! ModelEntity
  
        var part: ModelComponent = anchorEntity.children[0].components[ModelComponent]!
          
          print(part.mesh.contents.models.count)
        
          var List: MeshModelCollection = []
          List = part.mesh.contents.models
          print(&quot;head is \(List[&quot;/Head_Roundcube/Mesh&quot;]!)&quot;)
          var head = List[&quot;/Head_Roundcube/Mesh&quot;]! as? ModelComponent
          for item in part.mesh.contents.models {
              print(&quot;item: \(item.parts)&quot;)
          }
        //  print(part)
                  
          //chenge the color if the object
          var material = SimpleMaterial()
          material.baseColor = .color(.white)
         // model.model?.materials = [material]
          head?.materials = [material]
          
          part.materials[0] = material
          
          model.addChild(part as! Entity)
         
           
          model.generateCollisionShapes(recursive: true)
          arView.installGestures([.translation,.rotation,.scale],for: model)
          arView.scene.anchors.append(anchorEntity)
  
  </code></pre>
  <p>there is a screenshot of the error that occurs
  <a href="https://i.stack.imgur.com/jHuoe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jHuoe.jpg" alt="Screenshot" /></a></p>
  <p>and this is the object I and dealing with
  <a href="https://i.stack.imgur.com/IpaS7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IpaS7.png" alt="3d object" /></a></p>
  <p>and these are the console messages</p>
  <pre><code>Warning: in AppendProperty at line 859 of sdf/path.cpp -- Can only append a property 'triggers' to a prim path (/)
  Model is ModelComponent(mesh: RealityKit.MeshResource, materials: [], _boundsMargin: 0.0)
  3
  head is Model(id: &quot;/Head_Roundcube/Mesh&quot;, parts: RealityFoundation.MeshPartCollection(table: [&quot;MeshPart&quot;: (extension in RealityFoundation):RealityKit.MeshResource.Part(bufferDict: RealityFoundation.MeshBufferDictionary(bufferTable: [&quot;originalPartVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalPartVertexIndex&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;normals&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: &quot;normals&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexTangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexTangent, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;originalModelVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalModelVertexIndex&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexNormal: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexNormal, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), indexTriangles: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt16&gt;(id: indexTriangles, count: 12672, rate: RealityFoundation.MeshBuffers.Rate.faceVarying, elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, count: 12672, rate: RealityFoundation.MeshBuffers.Rate.faceVarying)), &quot;primvars:UVChannel_1&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: &quot;primvars:UVChannel_1&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexPosition: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexPosition, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexUV: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: vertexUV, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexBitangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexBitangent, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex))]), id: &quot;MeshPart&quot;, materialIndex: 0, materialWasInvalid: false)]))
  item: MeshPartCollection(table: [&quot;MeshPart&quot;: (extension in RealityFoundation):RealityKit.MeshResource.Part(bufferDict: RealityFoundation.MeshBufferDictionary(bufferTable: [vertexNormal: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexNormal, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexPosition: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexPosition, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;normals&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: &quot;normals&quot;, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;originalPartVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalPartVertexIndex&quot;, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexBitangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexBitangent, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), indexTriangles: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt16&gt;(id: indexTriangles, count: 9984, rate: RealityFoundation.MeshBuffers.Rate.faceVarying, elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, count: 9984, rate: RealityFoundation.MeshBuffers.Rate.faceVarying)), vertexTangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexTangent, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;originalModelVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalModelVertexIndex&quot;, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexUV: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: vertexUV, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;primvars:UVChannel_1&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: &quot;primvars:UVChannel_1&quot;, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 1802, rate: RealityFoundation.MeshBuffers.Rate.vertex))]), id: &quot;MeshPart&quot;, materialIndex: 0, materialWasInvalid: false)])
  item: MeshPartCollection(table: [&quot;MeshPart&quot;: (extension in RealityFoundation):RealityKit.MeshResource.Part(bufferDict: RealityFoundation.MeshBufferDictionary(bufferTable: [vertexBitangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexBitangent, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexPosition: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexPosition, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexUV: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: vertexUV, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexNormal: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexNormal, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;normals&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: &quot;normals&quot;, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexTangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexTangent, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;originalPartVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalPartVertexIndex&quot;, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;primvars:UVChannel_1&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: &quot;primvars:UVChannel_1&quot;, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex)), indexTriangles: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt16&gt;(id: indexTriangles, count: 38016, rate: RealityFoundation.MeshBuffers.Rate.faceVarying, elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, count: 38016, rate: RealityFoundation.MeshBuffers.Rate.faceVarying)), &quot;originalModelVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalModelVertexIndex&quot;, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 6625, rate: RealityFoundation.MeshBuffers.Rate.vertex))]), id: &quot;MeshPart&quot;, materialIndex: 0, materialWasInvalid: false)])
  item: MeshPartCollection(table: [&quot;MeshPart&quot;: (extension in RealityFoundation):RealityKit.MeshResource.Part(bufferDict: RealityFoundation.MeshBufferDictionary(bufferTable: [vertexBitangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexBitangent, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;originalModelVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalModelVertexIndex&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexUV: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: vertexUV, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;normals&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: &quot;normals&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexPosition: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexPosition, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexNormal: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexNormal, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), vertexTangent: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;RealityFoundation.FloatVector3Packed&gt;(id: vertexTangent, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, buffer: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;(closure: RealityFoundation.MeshBuffer&lt;RealityFoundation.FloatVector3Packed&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd3Float, packed: true, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), &quot;originalPartVertexIndex&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt32&gt;(id: &quot;originalPartVertexIndex&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt32&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt32, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex)), indexTriangles: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.UInt16&gt;(id: indexTriangles, count: 12672, rate: RealityFoundation.MeshBuffers.Rate.faceVarying, elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.UInt16&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.uInt16, packed: false, count: 12672, rate: RealityFoundation.MeshBuffers.Rate.faceVarying)), &quot;primvars:UVChannel_1&quot;: RealityFoundation.MeshBufferDictionary.(unknown context at $1f4023720).BufferEntry&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(id: &quot;primvars:UVChannel_1&quot;, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex, elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, buffer: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;(closure: RealityFoundation.MeshBuffer&lt;Swift.SIMD2&lt;Swift.Float&gt;&gt;.Closures(getArray: (Function), getIndices: (Function), getData: (Function), chunk: (Function)), elementType: RealityFoundation.MeshBuffers.ElementType.simd2Float, packed: false, count: 2210, rate: RealityFoundation.MeshBuffers.Rate.vertex))]), id: &quot;MeshPart&quot;, materialIndex: 0, materialWasInvalid: false)])
  Swift/ContiguousArrayBuffer.swift:593: Fatal error: Index out of range
  2022-03-07 01:31:45.189592+0300 MarsamApp[613:53684] Swift/ContiguousArrayBuffer.swift:593: Fatal error: Index out of range
  (lldb) 
  </code></pre>