Class ARReferencePointManager
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Syntax
public sealed class ARReferencePointManager : ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>
Properties
gameObjectName
Declaration
protected override string gameObjectName { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
referencePointPrefab
Getter/setter for the Reference Point Prefab.
Declaration
public GameObject referencePointPrefab { get; set; }
Property Value
| Type | Description |
|---|---|
| GameObject |
Methods
AddReferencePoint(Pose)
Attempts to add an ARReferencePoint with the given Pose.
Declaration
public ARReferencePoint AddReferencePoint(Pose pose)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | pose | The pose, in Unity world space, of the ARReferencePoint. |
Returns
| Type | Description |
|---|---|
| ARReferencePoint | A new ARReferencePoint if successful, otherwise |
Remarks
If GameObject will be created. In either case, the resulting
GameObject will have an ARReferencePoint component on it.
AttachReferencePoint(ARPlane, Pose)
Attempts to create a new reference point that is attached to an existing ARPlane.
Declaration
public ARReferencePoint AttachReferencePoint(ARPlane plane, Pose pose)
Parameters
| Type | Name | Description |
|---|---|---|
| ARPlane | plane | The ARPlane to which to attach. |
| Pose | pose | The initial |
Returns
| Type | Description |
|---|---|
| ARReferencePoint | A new ARReferencePoint if successful, otherwise |
GetPrefab()
Declaration
protected override GameObject GetPrefab()
Returns
| Type | Description |
|---|---|
| GameObject |
Overrides
GetReferencePoint(TrackableId)
Gets the ARReferencePoint with given trackableId,
or null if it does not exist.
Declaration
public ARReferencePoint GetReferencePoint(TrackableId trackableId)
Parameters
| Type | Name | Description |
|---|---|---|
| TrackableId | trackableId | The |
Returns
| Type | Description |
|---|---|
| ARReferencePoint | The ARReferencePoint with |
OnTrackablesChanged(List<ARReferencePoint>, List<ARReferencePoint>, List<ARReferencePoint>)
Declaration
protected override void OnTrackablesChanged(List<ARReferencePoint> addedPoints, List<ARReferencePoint> updatedPoints, List<ARReferencePoint> removedPoints)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ARReferencePoint> | addedPoints | |
| List<ARReferencePoint> | updatedPoints | |
| List<ARReferencePoint> | removedPoints |
Overrides
RemoveReferencePoint(ARReferencePoint)
Attempts to remove an ARReferencePoint.
Declaration
public bool RemoveReferencePoint(ARReferencePoint referencePoint)
Parameters
| Type | Name | Description |
|---|---|---|
| ARReferencePoint | referencePoint | The reference point you wish to remove. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Events
referencePointsChanged
Invoked once per frame to communicate changes to reference points, including new reference points, the update of existing reference points, and the removal of previously existing reference points.
Declaration
public event Action<ARReferencePointsChangedEventArgs> referencePointsChanged
Event Type
| Type | Description |
|---|---|
| Action<ARReferencePointsChangedEventArgs> |