ObjectTrackerBaseBehaviour is the component to control ObjectTracker in the AR scene.
ObjectTracker is used for 3d object target detection and tracking. ObjectTracker detects and tracks ObjectTarget. You can call StartTrack/StopTrack to enable/disable the track process. StartTrack and StopTrack are very lightweight calls.
ObjectTrackerBaseBehaviour should Bind to a DeviceAbstractBehaviour. This will be automatically done by the ARBuilder if you put ObjectTrackerBaseBehaviour in the scene before everything start. If you add the component later in the scene, make sure to Bind it to a DeviceAbstractBehaviour, for example, Bind to a CameraDeviceBaseBehaviour.
You will receive TargetAbstractBehaviour.TargetFound / TargetAbstractBehaviour.TargetLost and ARCameraBaseBehaviour.TargetFound / ARCameraBaseBehaviour.TargetLost events when a target is found or lost.
Overwritten MonoBahaviour Functions¶
The ObjectTargetBaseBehaviours currently loaded into the component.
The max number of targets which will be the simulatneously tracked by the tracker. The default value is 1.
void LoadObjectTargetBehaviour(ObjectTargetBaseBehaviour ObjectTargetBaseBehaviour)¶
void UnloadObjectTargetBehaviour(ObjectTargetBaseBehaviour ObjectTargetBaseBehaviour)¶
Unload the ObjectTargetBaseBehaviour and its target from the component.
Starts the track algorithm. The track will start only after the behaviour is Bind to a DeviceAbstractBehaviour. This will be automatically done by the ARBuilder if you put ObjectTrackerBaseBehaviour in the scene before everything start.
Stops the track algorithm. Call StartTrack to start the track again.
event Action<ObjectTrackerBaseBehaviour, ObjectTargetBaseBehaviour, Target, bool> TargetLoad¶
The event for target load.
event Action<ObjectTrackerBaseBehaviour, ObjectTargetBaseBehaviour, Target, bool> TargetUnload¶
The event for target unload.