ImageTrackerBaseBehaviour Class (since 1.3.0)¶
Inherits: DeviceUserAbstractBehaviour
Description¶
ImageTrackerBaseBehaviour (since 1.3.0) 是在AR场景中控制ImageTracker的component。
ImageTargetBaseBehaviour 必须先被加载到ImageTrackerBaseBehaviour中它内部的target 才能被跟踪。
Public Fields¶
ImageTracker Tracker
Public Properties¶
List<ImageTargetBaseBehaviour> LoadedTargetBehaviours
int SimultaneousNum
Public Functions¶
void LoadImageTargetBehaviour(ImageTargetBaseBehaviour imageTargetBaseBehaviour)
void UnloadImageTargetBehaviour(ImageTargetBaseBehaviour imageTargetBaseBehaviour)
bool StartTrack()
bool StopTrack()
Public Events¶
event Action<ImageTrackerBaseBehaviour, ImageTargetBaseBehaviour, Target, bool> TargetLoad
event Action<ImageTrackerBaseBehaviour, ImageTargetBaseBehaviour, Target, bool> TargetUnload
Overwritten MonoBahaviour Functions¶
protected virtual void OnDestroy()
protected virtual void Start()
protected virtual void Update()
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卸载事件。