Class ARParticipantManager
A manager for ARParticipants. Creates, updates, and removes
GameObject
s in response to other users in a multi-user collaborative session.
Inheritance
ARTrackableManager<XRParticipantSubsystem, XRParticipantSubsystemDescriptor, XRParticipant, ARParticipant>
ARParticipantManager
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Syntax
public sealed class ARParticipantManager : ARTrackableManager<XRParticipantSubsystem, XRParticipantSubsystemDescriptor, XRParticipant, ARParticipant>
Properties
gameObjectName
The name to be used for the GameObject
whenever a new participant is detected.
Declaration
protected override string gameObjectName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
UnityEngine.XR.ARFoundation.ARTrackableManager<XRParticipantSubsystem, XRParticipantSubsystemDescriptor, XRParticipant, UnityEngine.XR.ARFoundation.ARParticipant>.gameObjectName
participantPrefab
(Optional) Instantiates this prefab for each participant. If null
, an empty GameObject
with a ARParticipant component is instantiated instead.
Declaration
public GameObject participantPrefab { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
GetParticipant(TrackableId)
Attempt to retrieve an existing ARParticipant by trackableId
.
Declaration
public ARParticipant GetParticipant(TrackableId trackableId)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableId | The |
Returns
Type | Description |
---|---|
ARParticipant | The ARParticipant with |
GetPrefab()
Declaration
protected override GameObject GetPrefab()
Returns
Type | Description |
---|---|
GameObject |
Overrides
UnityEngine.XR.ARFoundation.ARTrackableManager<XRParticipantSubsystem, XRParticipantSubsystemDescriptor, XRParticipant, UnityEngine.XR.ARFoundation.ARParticipant>.GetPrefab()
OnTrackablesChanged(List<ARParticipant>, List<ARParticipant>, List<ARParticipant>)
Declaration
protected override void OnTrackablesChanged(List<ARParticipant> added, List<ARParticipant> updated, List<ARParticipant> removed)
Parameters
Type | Name | Description |
---|---|---|
List<ARParticipant> | added | |
List<ARParticipant> | updated | |
List<ARParticipant> | removed |
Overrides
UnityEngine.XR.ARFoundation.ARTrackableManager<XRParticipantSubsystem, XRParticipantSubsystemDescriptor, XRParticipant, UnityEngine.XR.ARFoundation.ARParticipant>.OnTrackablesChanged(System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARParticipant>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARParticipant>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARParticipant>)
Events
participantsChanged
Invoked when participants have changed (been added, updated, or removed).
Declaration
public event Action<ARParticipantsChangedEventArgs> participantsChanged
Event Type
Type | Description |
---|---|
Action<ARParticipantsChangedEventArgs> |