A component that specifies an entity is participating in the system's scene-understanding features.
Scene understanding refers to RealityKit features like physics collision, shadows, and occlusion with real-world geometry.
In iOS, `SceneUnderstandingComponent` is a read-only component. Manually adding
it doesn't have any effect.
In visionOS and macOS, `SceneUnderstandingComponent` is a write-only component.
Add `SceneUnderstandingComponent` to your custom entities to let it behave
as a virtual scene-understanding mesh.
For more information about scene-understanding features, see <doc:realitykit-scene-understanding>.
Creates a component for the given entity type that makes an entity aware
of certain aspects of the physical environment.
- Parameters:
- entityType: The entity type to make the component for.
get · iOS 15.0+
entityType
TypeScript
get entityType(): (SceneUnderstandingComponent_EntityType) | null
Swift declaration
var entityType: SceneUnderstandingComponent.EntityType?
The type of real-world objects that the component models.
set · iOS 15.0+
entityType
TypeScript
set entityType(value: (SceneUnderstandingComponent_EntityType) | null)
Swift declaration
var entityType: SceneUnderstandingComponent.EntityType?
The type of real-world objects that the component models.
get · iOS 18.0+
origin
TypeScript
get origin(): SceneUnderstandingComponent_Origin
Swift declaration
var origin: SceneUnderstandingComponent.Origin { get }
The origin that RealityKit creates the component from.
init · iOS 15.0+
init
TypeScript
static init(): SceneUnderstandingComponent
Swift declaration
init()
Creates a component that makes an entity aware of certain aspects of the
physical environment.