Contents

Scene

A container that holds the collection of entities that an AR view renders.

Declaration

@MainActor @preconcurrency class Scene

Overview

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

Synchronizing entities with other devices

Publishing and subscribing to events

Structures

Instance Properties

Default Implementations

See Also

Scene management