ImageTrackerBaseBehaviour Class

Description

ImageTrackerBaseBehaviour (since 1.3.0)是在AR场景中控制ImageTracker的component。

ImageTargetBaseBehaviour必须先被加载到ImageTrackerBaseBehaviour中它内部的target才能被跟踪。

Public Fields

ImageTrackerTracker

Public Properties

List<ImageTargetBaseBehaviour>LoadedTargetBehaviours
intSimultaneousNum

Public Functions

voidLoadImageTargetBehaviour(ImageTargetBaseBehaviour imageTargetBaseBehaviour)
voidUnloadImageTargetBehaviour(ImageTargetBaseBehaviour imageTargetBaseBehaviour)
boolStartTrack()
boolStopTrack()

Public Events

event Action<ImageTrackerBaseBehaviour, ImageTargetBaseBehaviour, Target, bool>TargetLoad
event Action<ImageTrackerBaseBehaviour, ImageTargetBaseBehaviour, Target, bool>TargetUnload

Overwritten MonoBahaviour Functions

protected virtual voidOnDestroy()
protected virtual voidStart()
protected virtual voidUpdate()

ImageTracker Tracker

ImageTracker物体。你可以通过Tracker获得更加高级的控制。详见ImageTracker

List<ImageTargetBaseBehaviour> LoadedTargetBehaviours

当前加载进这个component的所有ImageTargetBaseBehaviour。

int SimultaneousNum

最大可被tracker跟踪的目标个数。默认值为1。

void LoadImageTargetBehaviour(ImageTargetBaseBehaviour imageTargetBaseBehaviour)

将ImageTargetBaseBehaviour以及它内部的target加载进这个component。这个方法和ImageTargetBaseBehaviour.LoadIntoTrackerBehaviour是相同的。

void UnloadImageTargetBehaviour(ImageTargetBaseBehaviour imageTargetBaseBehaviour)

从这个component中卸载ImageTargetBaseBehaviour和它的target。

bool StartTrack()

开始跟踪。详见ImageTracker.Start

bool StopTrack()

停止跟踪。详见ImageTracker.Stop

event Action<ImageTrackerBaseBehaviour, ImageTargetBaseBehaviour, Target, bool> TargetLoad

Target加载事件。

event Action<ImageTrackerBaseBehaviour, ImageTargetBaseBehaviour, Target, bool> TargetUnload

Target卸载事件。