Skip to content

Instantly share code, notes, and snippets.

@eospi
eospi / loadEntityAsync.swift
Last active August 2, 2024 19:27
RealityKit Asynchronous Loading
import Combine
func loadEntityAsync() {
// Create an world anchor at the origin and add it to the scene
let anchor = AnchorEntity(world: [0,0,0])
arView.scene.addAnchor(anchor)
let usdzPath = "path/to/usdz/asset"
// Load the asset asynchronously