C API Unity API
Unity API Reference (Version 10.22.5)
AnchorBehaviour Class Reference

An anchor that helps stabilize a GameObjects position in the real world More...

Inheritance diagram for AnchorBehaviour:
ObserverBehaviour VuforiaMonoBehaviour

Public Member Functions

void ConfigureAnchor (string name, Vector3 position, Quaternion rotation)
 Creates a mid-air anchor using the transform of the pose (position/rotation) where it should be anchored. The behaviour is attached to that anchor. More...
 
void ConfigureAnchor (string name, HitTestResult hitTestResult)
 Creates a plane anchor at the location of the hit test result. The behaviour is attached to that anchor. More...
 
void UnconfigureAnchor ()
 Detaches the behaviour from an anchor. More...
 

Additional Inherited Members

- Public Attributes inherited from ObserverBehaviour
int ID => mObserver?.Id
 The runtime Id of the Observer More...
 
string TargetName => mTrackableName
 Name of the target of the Observer More...
 
- Properties inherited from ObserverBehaviour
TargetStatus TargetStatus [get]
 Current status information of the target More...
 
- Events inherited from ObserverBehaviour
Action< ObserverBehaviourOnBehaviourDestroyed
 Triggered when this behaviour is destroyed. Can be used for script cleanup More...
 
Action< ObserverBehaviour, TargetStatusOnTargetStatusChanged
 Triggered when the TargetStatus changes More...
 

Detailed Description

An anchor that helps stabilize a GameObjects position in the real world

Member Function Documentation

◆ ConfigureAnchor() [1/2]

void ConfigureAnchor ( string  name,
Vector3  position,
Quaternion  rotation 
)
inline

Creates a mid-air anchor using the transform of the pose (position/rotation) where it should be anchored. The behaviour is attached to that anchor.

Parameters
nameThe logical name of the anchor. This must be unique among all created anchors.
positionThe position at which the anchor will be created.
rotationThe rotation of the anchor that will be created.

◆ ConfigureAnchor() [2/2]

void ConfigureAnchor ( string  name,
HitTestResult  hitTestResult 
)
inline

Creates a plane anchor at the location of the hit test result. The behaviour is attached to that anchor.

Parameters
nameThe logical name of the anchor. This must be unique among all created anchors.
hitTestResultThe HitTestResult containing the pose at which the anchor will be created on a plane.

◆ UnconfigureAnchor()

void UnconfigureAnchor ( )
inline

Detaches the behaviour from an anchor.