I want to draw a mesh generated by SceneReconstructionProvider with a material set, but how should I draw the ShapeResource? I want to give a material to the mesh of the recognized wall or object to direct it.
print("Part of the scene has been updated: ", update.anchor)
task(priority: .low) {
let shape = try await ShapeResource.generateStaticMesh(from: update.anchor)
let entity = Entity()
// What do I need to add?
entity.components[CollisionComponent.self] = .init(shapes: [shape])
entity.components[PhysicsBodyComponent.self] = .init(
massProperties: .default, .
material: nil, ,
mode: .static)
}
```