This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @MainActor | |
| func placeInRealityView(modelURL: URL, into content: RealityViewContent, under parent: Entity?) async throws { | |
| let entity = try await ModelEntity(contentsOf: modelURL) | |
| var mc = ManipulationComponent() | |
| ManipulationComponent.configureEntity(entity, collisionShapes: nil) | |
| entity.components.set(mc) | |
| let anchor = AnchorEntity(world: .zero) | |
| content.add(anchor) | |
| anchor.addChild(entity) |
OlderNewer