<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/Entity",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation6EntityC"
  },
  "title" : "Entity"
}
-->

# Entity

An element of a RealityKit scene to which you attach components that provide
appearance and behavior characteristics for the entity.

```
@MainActor @preconcurrency class Entity
```

## Overview

You create and configure entities to embody objects that you want to place
in the real world in an AR app. You do this by adding [`Entity`](/documentation/RealityKit/Entity) instances
to the [`Scene`](/documentation/RealityKit/Scene) instance associated with an [`ARView`](/documentation/RealityKit/ARView).

RealityKit defines a few concrete subclasses of [`Entity`](/documentation/RealityKit/Entity) that provide
commonly used functionality. For example, you typically start by creating an
instance of [`AnchorEntity`](/documentation/RealityKit/AnchorEntity) to anchor your content, and add the anchor to a
scene’s [`anchors`](/documentation/RealityKit/Scene/anchors) collection. You might then instantiate a
[`ModelEntity`](/documentation/RealityKit/ModelEntity) to represent a physical object in the scene, and add that as
a child entity to the anchor. You can also create custom entities, and add
them either to an anchor, or as children of another entity.

![Block diagram showing how entity hierarchies, composed of different kinds](images/com.apple.RealityKit/Entity-1~dark@2x.png)

You can load predefined entities or a hierarchy of entities from your app’s
bundle, or from a file on disk, using the methods in [Stored entities](/documentation/RealityKit/stored-entities).
Alternatively, you can create entities programmatically.

Entities contain components (instances conforming to the [`Component`](/documentation/RealityKit/Component)
protocol) that provide appearance and behaviors for the entity. For example,
the [`Transform`](/documentation/RealityKit/Transform) component contains the scale, rotation, and translation
information needed to position an entity in space. You store components in
the entity’s [`components`](/documentation/RealityKit/Entity/components) collection, which can hold exactly one of
any component type. It makes sense to have only a single [`Transform`](/documentation/RealityKit/Transform)
component, one [`ModelComponent`](/documentation/RealityKit/ModelComponent) (specifying the visual appearance of the
entity), and so on.

![Diagram showing the components present in the base entity class, as well](images/com.apple.RealityKit/Entity-2~dark@2x.png)

All entities inherit a few common components from the [`Entity`](/documentation/RealityKit/Entity) base class:
the [`Transform`](/documentation/RealityKit/Transform) component for spatial positioning, and
[`SynchronizationComponent`](/documentation/RealityKit/SynchronizationComponent), which enables synchronization of the entity
among networked peers. Specific types of entities define additional
behaviors. For example, the model entity has components for visual
appearance ([`ModelComponent`](/documentation/RealityKit/ModelComponent)), collision detection
([`CollisionComponent`](/documentation/RealityKit/CollisionComponent)), and physics simulations ([`PhysicsBodyComponent`](/documentation/RealityKit/PhysicsBodyComponent)
and [`PhysicsMotionComponent`](/documentation/RealityKit/PhysicsMotionComponent)).

## Topics

### Creating an entity

[`init()`](/documentation/RealityKit/Entity/init())

Creates a new entity.

[`init(components:)`](/documentation/RealityKit/Entity/init(components:)-1lmhe)

Creates an entity with multiple components.

[`init(components:)`](/documentation/RealityKit/Entity/init(components:)-1lmhe)

Creates an entity with multiple components.

[`clone(recursive:)`](/documentation/RealityKit/Entity/clone(recursive:))

Duplicates an entity to create a new entity.

[`didClone(from:)`](/documentation/RealityKit/Entity/didClone(from:))

Tells a newly cloned entity that cloning is complete.

### Loading an entity from a file

  <doc://com.apple.documentation/documentation/visionOS/generating-procedural-textures-in-visionos>

[`Resource`](/documentation/RealityKit/Resource)

A shared resource you use to configure a component, like a material, mesh,
or texture.

[Loading entities from a file](/documentation/RealityKit/loading-entities-from-a-file)

Retrieve an entity from storage on disk using a synchronous or an asynchronous load
operation.

[Stored entities](/documentation/RealityKit/stored-entities)

Manage entities that you store as assets on disk.

  <doc://com.apple.documentation/documentation/USD/creating-usd-files-for-apple-devices>

[`init(contentsOf:withName:)`](/documentation/RealityKit/Entity/init(contentsOf:withName:))

Creates an entity by asynchronously loading it from a file URL.

[`init(named:in:)`](/documentation/RealityKit/Entity/init(named:in:))

Creates an entity by asynchronously loading it from a bundle.

[`ReferenceComponent`](/documentation/RealityKit/ReferenceComponent)

A component that can load another entity from a file.

### Loading an entity from a configuration catalog

[`init(from:configurations:)`](/documentation/RealityKit/Entity/init(from:configurations:))

Loads an entity from a configuration catalog and a dictionary of configuration choices.

[`Entity.ConfigurationCatalog`](/documentation/RealityKit/Entity/ConfigurationCatalog)

A collection of alternative representations of an entity you can choose from.

### Positioning entities in space

[`HasTransform`](/documentation/RealityKit/HasTransform)

An interface that enables manipulating the scale, rotation, and translation
of an entity.

[`Transform`](/documentation/RealityKit/Transform)

A component that defines the scale, rotation, and translation of an entity.

[`transformMatrix(relativeTo:)`](/documentation/RealityKit/Entity/transformMatrix(relativeTo:))

Returns the 4 x 4 transform matrix of an entity relative to the given
coordinate space.

[`Entity.CoordinateSpaceReference`](/documentation/RealityKit/Entity/CoordinateSpaceReference)

Defines the coordinate space reference for transform conversion.

[`Entity.ForwardDirection`](/documentation/RealityKit/Entity/ForwardDirection)

Defines the forward direction for an entity.

### Relating entities

[`parameters`](/documentation/RealityKit/Entity/parameters)

Represents a reference to the parameters for a particular entity.

[`Entity.ChildCollection`](/documentation/RealityKit/Entity/ChildCollection)

A collection of child entities.

[`HasHierarchy`](/documentation/RealityKit/HasHierarchy)

An interface that provides access to a parent entity and child entities.

### Managing components

[`components`](/documentation/RealityKit/Entity/components)

All the components that an entity stores.

[`Entity.ComponentSet`](/documentation/RealityKit/Entity/ComponentSet)

A collection of components that an entity stores.

### Inspecting an entity

[`scene`](/documentation/RealityKit/Entity/scene)

The scene that owns the entity.

[`name`](/documentation/RealityKit/Entity/name)

The name of the entity.

[`findEntity(named:)`](/documentation/RealityKit/Entity/findEntity(named:))

Recursively searches all descendant entities for one with the given
name.

[`debugDescription`](/documentation/RealityKit/Entity/debugDescription)

A human readable description of the entity.

### Managing the entity’s state

[`isEnabled`](/documentation/RealityKit/Entity/isEnabled)

A Boolean that you set to enable or disable the entity and its
descendants.

[`isEnabledInHierarchy`](/documentation/RealityKit/Entity/isEnabledInHierarchy)

A Boolean that indicates whether the entity and all of its ancestors are
enabled.

[`isActive`](/documentation/RealityKit/Entity/isActive)

A Boolean that indicates whether the entity is active.

[`isAnchored`](/documentation/RealityKit/Entity/isAnchored)

A Boolean that indicates whether the entity is anchored.

### Synchronizing entities with other devices

[`SynchronizationComponent`](/documentation/RealityKit/SynchronizationComponent)

A component that synchronizes an entity between processes and networked
applications.

### Finding the nearest anchor

[`anchor`](/documentation/RealityKit/Entity/anchor)

The nearest ancestor entity that can act as an anchor.

### Creating a collision shape

[`generateCollisionShapes(recursive:)`](/documentation/RealityKit/Entity/generateCollisionShapes(recursive:))

Creates the shape used to detect collisions between two entities that
have collision components.

[`generateCollisionShapes(recursive:static:)`](/documentation/RealityKit/Entity/generateCollisionShapes(recursive:static:))

Creates the shape used to detect collisions between two entities that
have collision components.

### Animating an entity

[`availableAnimations`](/documentation/RealityKit/Entity/availableAnimations)

The list of animations associated with the entity.

[`playAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:)`](/documentation/RealityKit/Entity/playAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:))

Plays an animation with the specified options.

[`playAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:handoffType:)`](/documentation/RealityKit/Entity/playAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:handoffType:))

Plays an animation with the specified options.

[`playAnimation(_:transitionDuration:startsPaused:)`](/documentation/RealityKit/Entity/playAnimation(_:transitionDuration:startsPaused:))

Plays the given animation on the entity.

[`stopAllAnimations(recursive:)`](/documentation/RealityKit/Entity/stopAllAnimations(recursive:))

Stops all playing of animations on this entity.

[`defaultAnimationClock`](/documentation/RealityKit/Entity/defaultAnimationClock)

Returns the default animation clock for this entity.

[`parameters`](/documentation/RealityKit/Entity/parameters)

Represents a reference to the parameters for a particular entity.

[`Entity.ParameterSet`](/documentation/RealityKit/Entity/ParameterSet)

Represents a reference to the parameters for a particular entity.

[`playAnimation(named:transitionDuration:startsPaused:recursive:)`](/documentation/RealityKit/Entity/playAnimation(named:transitionDuration:startsPaused:recursive:))

Plays all the animations with the given name on the entity.

[`bindableValues`](/documentation/RealityKit/Entity/bindableValues)

[`subscript(_:)`](/documentation/RealityKit/Entity/subscript(_:))

Resolves the entity from the given entity path.

### Animating and controlling characters

[`characterController`](/documentation/RealityKit/Entity/characterController)

The character controller component for the entity.

[`characterControllerState`](/documentation/RealityKit/Entity/characterControllerState)

The character controller state for  the entity.

[`moveCharacter(by:deltaTime:relativeTo:collisionHandler:)`](/documentation/RealityKit/Entity/moveCharacter(by:deltaTime:relativeTo:collisionHandler:))

Moves the character along a specified vector over a period of time.

[`teleportCharacter(to:relativeTo:)`](/documentation/RealityKit/Entity/teleportCharacter(to:relativeTo:))

Moves the character instantly to a new position.

### Playing audio

[`playAudio(_:)`](/documentation/RealityKit/Entity/playAudio(_:))

Prepares and plays a new audio playback instance on this entity.

[`playAudio(configuration:_:)`](/documentation/RealityKit/Entity/playAudio(configuration:_:))

Prepares and plays a real-time audio playback instance.

[`prepareAudio(configuration:_:)`](/documentation/RealityKit/Entity/prepareAudio(configuration:_:))

Prepares a real-time audio playback instances.

[`prepareAudio(_:)`](/documentation/RealityKit/Entity/prepareAudio(_:))

Prepares an audio resource for playback.

[`stopAllAudio()`](/documentation/RealityKit/Entity/stopAllAudio())

Stops playback for all audio on this entity.

[`spatialAudio`](/documentation/RealityKit/Entity/spatialAudio)

The component that configures the spatial rendering of sounds from this entity.

[`ambientAudio`](/documentation/RealityKit/Entity/ambientAudio)

The component that configures the ambient rendering of sounds from this entity.

[`channelAudio`](/documentation/RealityKit/Entity/channelAudio)

The component that configures the channel-based rendering of sounds from this entity.

### Saving an entity and its descendants

[`write(to:)`](/documentation/RealityKit/Entity/write(to:))

Exports the entity as a RealityKit file to a location in the file system.

### Configuring accessibility features

[Improving the Accessibility of RealityKit Apps](/documentation/RealityKit/improving-the-accessibility-of-realitykit-apps)

Incorporate assistive technologies in your augmented reality app.

[`isAccessibilityElement`](/documentation/RealityKit/Entity/isAccessibilityElement)

A Boolean value indicating whether the receiver is an accessibility
element that an assistive application can access.

[`accessibilityLabelKey`](/documentation/RealityKit/Entity/accessibilityLabelKey)

A succinct label that identifies the entity, in a localized string key.

[`accessibilityCustomActions`](/documentation/RealityKit/Entity/accessibilityCustomActions)

An array of custom actions supported by the entity, identified by their localized string key.

[`accessibilityCustomContent`](/documentation/RealityKit/Entity/accessibilityCustomContent)

The Custom Content API is useful for delivering accessibility information from complex data sets to your users in measured portions.
Using this API allows you to leverage assistive technologies to present only the accessible content your app’s users need, when they need it.

[`accessibilityCustomRotors`](/documentation/RealityKit/Entity/accessibilityCustomRotors)

An array of supported rotors.

[`accessibilityLabelKey`](/documentation/RealityKit/Entity/accessibilityLabelKey)

A succinct label that identifies the entity, in a localized string key.

[`accessibilitySystemActions`](/documentation/RealityKit/Entity/accessibilitySystemActions)

The set of supported accessibility actions.

[`accessibilityTraits`](/documentation/RealityKit/Entity/accessibilityTraits)

The combination of accessibility traits that best characterize the entity.

[`accessibilityValue`](/documentation/RealityKit/Entity/accessibilityValue)

A localized string key that represents the current value of the entity.

[`accessibilityDescription`](/documentation/RealityKit/Entity/accessibilityDescription)

A longer description of the entity for use by assistive technologies.

[`accessibilityLabel`](/documentation/RealityKit/Entity/accessibilityLabel)

A succinct label that identifies the purpose of the image.

[`accessibilityDescription`](/documentation/RealityKit/Entity/accessibilityDescription)

A longer description of the entity for use by assistive technologies.

### Comparing entities

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
