Scene
A container that holds the collection of entities that an AR view renders.
Declaration
@MainActor @preconcurrency class SceneOverview
You don’t create a Scene instance directly. Instead, you get the one and only scene associated with a view from the scene property of an ARView instance.
[Image]
To add content to the view’s scene, you first create and add one or more AnchorEntity instances to the scene’s anchors collection. Anchors tell RealityKit how to pin virtual content to real world objects, like flat surfaces or images. You then add a hierarchy of other Entity instances to each anchor to indicate the geometry and behaviors that RealityKit should render at a given anchor point.
Topics
Identifying the scene
Adding and removing anchors
Finding entities
Detecting intersections
raycast(origin:direction:length:query:mask:relativeTo:)raycast(from:to:query:mask:relativeTo:)convexCast(convexShape:fromPosition:fromOrientation:toPosition:toOrientation:query:mask:relativeTo:)pixelCast(from:to:)pixelCast(origin:direction:length:)
Synchronizing entities with other devices
Publishing and subscribing to events
publisher(for:on:)subscribe(to:on:_:)publisher(for:on:componentType:)subscribe(to:on:componentType:_:)