Class SimulatedDiscoveryMarkerProvider
Implements
Inherited Members
Namespace: Unity.MARS.Providers.Synthetic
Assembly: Unity.MARS.dll
Syntax
[AddComponentMenu("")]
[ProviderSelectionOptions(-1073741824, null, false)]
public class SimulatedDiscoveryMarkerProvider : MonoBehaviour, IProvidesMarkerTracking, IFunctionalityProvider, IUsesMARSTrackableData<MRMarker>, IUsesFunctionalityInjection, IFunctionalitySubscriber<IProvidesFunctionalityInjection>, IProvidesTraits<bool>, IProvidesTraits<int>, IProvidesTraits<Pose>, IProvidesTraits<Vector2>, IProvidesTraits<string>, IProvidesTraits, IUsesSlowTasks, IFunctionalitySubscriber<IProvidesSlowTasks>, IFunctionalitySubscriber
Methods
GetMarkers(List<MRMarker>)
Get the currently tracked markers
Declaration
public void GetMarkers(List<MRMarker> markers)
Parameters
Type | Name | Description |
---|---|---|
List<MRMarker> | markers | A list of MRMarker objects to which the currently tracked markers will be added |
GetProvidedTraits()
Declaration
public TraitDefinition[] GetProvidedTraits()
Returns
Type | Description |
---|---|
TraitDefinition[] |
SetActiveMarkerLibrary(IMRMarkerLibrary)
Initialize the list of markers to look for when this marker tracking provider starts tracking. If an existing marker library is being used, this one replaces the active one and images contained in this marker library start getting detected. The existing tracked markers will stop receiving update events, and they may be removed.
Declaration
public bool SetActiveMarkerLibrary(IMRMarkerLibrary activeLibrary)
Parameters
Type | Name | Description |
---|---|---|
IMRMarkerLibrary | activeLibrary | Marker library with list of markers to detect |
Returns
Type | Description |
---|---|
bool |
StartTrackingMarkers()
Start tracking markers. Marker tracking is enabled on initialization, so this is only necessary after calling StopTrackingMarkers.
Declaration
public void StartTrackingMarkers()
StopTrackingMarkers()
Stop tracking markers. This will happen automatically on destroying the session. It is only necessary to call this method to pause marker tracking while maintaining camera tracking.
Declaration
public void StopTrackingMarkers()
Events
markerAdded
Called when a marker becomes tracked for the first time
Declaration
public event Action<MRMarker> markerAdded
Event Type
Type | Description |
---|---|
Action<MRMarker> |
markerRemoved
Called when a tracked marker is removed (lost)
Declaration
public event Action<MRMarker> markerRemoved
Event Type
Type | Description |
---|---|
Action<MRMarker> |
markerUpdated
Called when a tracked marker has updated data
Declaration
public event Action<MRMarker> markerUpdated
Event Type
Type | Description |
---|---|
Action<MRMarker> |