Class ARReferencePointManager
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(ARSessionOrigin))]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.0/api/UnityEngine.XR.ARFoundation.ARReferencePointManager.html")]
[Obsolete("ARReferencePointManager has been deprecated. Use ARAnchorManager instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager", true)]
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
[Obsolete("ARReferencePointManger.referencePointPrefab has been renamed. Use ARAnchorManager.anchorPrefab instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.anchorPrefab", true)]
public GameObject referencePointPrefab { get; set; }
Property Value
| Type | Description |
|---|---|
| GameObject |
Methods
AddReferencePoint(Pose)
Attempts to add an ARReferencePoint with the given Pose.
Declaration
[Obsolete("ARReferencePointManger.AddReferencePoint() has been deprecated. Use ARAnchorManager.AddAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.AddAnchor(*)", true)]
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
[Obsolete("ARReferencePointManger.AttachReferencePoint() has been deprecated. Use ARAnchorManager.AttachAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.AttachAnchor(*)", true)]
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
[Obsolete("ARReferencePointManger.GetReferencePoint() has been deprecated. Use ARAnchorManager.GetAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.GetAnchor(*)", true)]
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
[Obsolete("ARReferencePointManger.RemoveReferencePoint() has been deprecated. Use ARAnchorManager.RemoveAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.RemoveAnchor(*)", true)]
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
[Obsolete("ARReferencePointManger.referencePointsChanged has been renamed. Use ARAnchorManager.anchorsChanged instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.anchorsChanged", true)]
public event Action<ARReferencePointsChangedEventArgs> referencePointsChanged
Event Type
| Type | Description |
|---|---|
| Action<ARReferencePointsChangedEventArgs> |