Class TrackableManagerListener<TManager>
Listens to the trackables-changed event of TManager
and forwards it to the visual scripting event bus.
Namespace: UnityEngine .XR.ARFoundation.VisualScripting
Assembly: Unity.XR.ARFoundation.VisualScripting.dll
Syntax
[AddComponentMenu("")]
[DisallowMultipleComponent]
[Obsolete("TrackableManagerListener has been deprecated in AR Foundation version 6.0.", false)]
public abstract class TrackableManagerListener<TManager> : MessageListener where TManager : MonoBehaviour
Type Parameters
Name | Description |
---|---|
TManager | The event sender type. This should be an AR Foundation trackable manager. |
Remarks
TManager
is expected to be an AR Foundation trackable manager, but the current version
of AR Foundation lacks a shared interface for trackables-changed events. For now the best we can do is bind
to MonoBehaviour
as a base class.
Methods
RegisterTrackablesChangedDelegate(TManager)
Subscribes to the trackables-changed event of manager
.
This is method is called in OnEnable
.
Declaration
protected abstract void RegisterTrackablesChangedDelegate(TManager manager)
Parameters
Type | Name | Description |
---|---|---|
TManager | manager | The manager instance. |
UnregisterTrackablesChangedDelegate(TManager)
Unsubscribes from the trackables-changed event of manager
.
This is method is called in OnDisable
.
Declaration
protected abstract void UnregisterTrackablesChangedDelegate(TManager manager)
Parameters
Type | Name | Description |
---|---|---|
TManager | manager | The manager instance. |