Class ARPointCloudManager
A manager for ARTrackedObjects. Uses the XRDepthSubsystem
to recognize and track depth data in the physical environment.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Syntax
public class ARPointCloudManager : ARTrackableManager<XRDepthSubsystem, XRDepthSubsystemDescriptor, XRPointCloud, ARPointCloud>, IRaycaster
Properties
gameObjectName
The name to be used for the GameObject
whenever a new Object is detected.
Declaration
protected override string gameObjectName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
pointCloudPrefab
Getter/setter for the Point Cloud Prefab.
Declaration
public GameObject pointCloudPrefab { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
GetPrefab()
ARTrackableManager interface.
Declaration
protected override GameObject GetPrefab()
Returns
Type | Description |
---|---|
GameObject |
Overrides
OnAfterSetSessionRelativeData(ARPointCloud, XRPointCloud)
Declaration
protected override void OnAfterSetSessionRelativeData(ARPointCloud pointCloud, XRPointCloud sessionRelativeData)
Parameters
Type | Name | Description |
---|---|---|
ARPointCloud | pointCloud | |
XRPointCloud | sessionRelativeData |
Overrides
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()
Overrides
OnTrackablesChanged(List<ARPointCloud>, List<ARPointCloud>, List<ARPointCloud>)
Invokes the pointCloudsChanged event.
Declaration
protected override void OnTrackablesChanged(List<ARPointCloud> added, List<ARPointCloud> updated, List<ARPointCloud> removed)
Parameters
Type | Name | Description |
---|---|---|
List<ARPointCloud> | added | A list of objects added this frame. |
List<ARPointCloud> | updated | A list of objects updated this frame. |
List<ARPointCloud> | removed | A list of objects removed this frame. |
Overrides
Raycast(Ray, TrackableType, Allocator)
Implementation for the IRaycaster
interface. Raycasts against every point cloud.
Declaration
public NativeArray<XRRaycastHit> Raycast(Ray rayInSessionSpace, TrackableType trackableTypeMask, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
Ray | rayInSessionSpace | A |
TrackableType | trackableTypeMask | The type of trackables to raycast against.
If |
Allocator | allocator | The allocator to use for the returned |
Returns
Type | Description |
---|---|
NativeArray<XRRaycastHit> | A new |
Events
pointCloudsChanged
Declaration
public event Action<ARPointCloudChangedEventArgs> pointCloudsChanged
Event Type
Type | Description |
---|---|
Action<ARPointCloudChangedEventArgs> |