Skip to content

Instantly share code, notes, and snippets.

@arthurschiller
arthurschiller / realitview_scene+subscriptions.swift
Created August 4, 2024 11:23
RealityView Example for accessing scene and subscribing to events
import SwiftUI
import RealityKit
import Combine
struct ContentView: View {
@Environment(\.realityKitScene) var scene: RealityKit.Scene?
@State private var didAddEntitySubscription: Cancellable?