A description of how virtual content can be anchored to the real world.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
Framework
- Reality
Kit
Declaration
struct AnchoringComponent
A description of how virtual content can be anchored to the real world.
SDKs
Framework
struct AnchoringComponent
init(Anchoring Component .Target)
Creates an anchoring component for a given target.
init(ARAnchor)
Creates an anchoring component with the given AR anchor.
let target: Anchoring Component .Target
The kind of real world object to which the anchor entity should anchor.
enum Anchoring Component .Target
The kinds of real world objects to which an anchor entity can be tethered.
static func register Component()
Registers a new component type.
static func == (Anchoring Component, Anchoring Component) -> Bool
Indicates whether two anchoring components are equal.
static func != (Anchoring Component, Anchoring Component) -> Bool
Indicates whether two anchoring components are not equal.
var anchoring: Anchoring Component
The component that describes how virtual content is anchored to the real world.
var anchor Identifier: UUID?
The identifier of the AR anchor with which the anchor entity is associated, or nil
if it isn’t currently anchored.
func reanchor(Anchoring Component .Target, preserving World Transform: Bool)
Changes the entity’s anchoring, preserving either the world transform or the local transform.
protocol Has Anchoring
An interface that enables anchoring of virtual content to a real-world object in an AR scene.