ObjectTargetController Class¶
Description¶
MonoBehaviour which controls ObjectTarget in the scene, providing a few extensions in the Unity environment. Use ObjectTargetController.Target directly when necessary.
Enums¶
public enum ObjectTargetController.DataSource |
Target data source type. |
Classes¶
public class ObjectTargetController.ObjFileSourceData |
Obj file data for target creation. |
MonoBehaviour Messages¶
protected override void Start() |
protected virtual void Update() |
protected virtual void OnDestroy() |
Fields¶
SourceType¶
- C#
public ObjectTargetController.DataSource SourceType
Target data source.
ObjFileSource¶
- C#
public ObjectTargetController.ObjFileSourceData ObjFileSource
Obj file data source for target creation. Valid when ObjectTargetController.SourceType == ObjectTargetController.DataSource.ObjFile .
TargetSource¶
- C#
public ObjectTarget TargetSource
Target source when using a target already created. Valid when ObjectTargetController.SourceType == ObjectTargetController.DataSource.Target .
ActiveControl¶
- C#
public TargetController.ActiveControlStrategy ActiveControl
Strategy to control the GameObject .active. If you are willing to control GameObject .active or there are other components controlling GameObject .active, make sure to set it to TargetController.ActiveControlStrategy.None .
Properties¶
Target¶
- C#
public ObjectTarget Target { get; }
EasyAR Sense API. Accessible after TargetAvailable event.
Tracker¶
- C#
public ObjectTrackerFrameFilter Tracker { get; set; }
The ImageTrackerFrameFilter which loads the target after ObjectTargetController.TargetAvailable . When set to null, the target will be unloaded from tracker previously set. Modify at any time and takes effect immediately.
BoundingBox¶
- C#
public List< Vector3 > BoundingBox { get; }
Bounding box of the target.
IsTracked¶
- C#
public bool IsTracked { get; }
Is the target being tracked at the moment.
IsLoaded¶
- C#
public bool IsLoaded { get; protected set; }
Is the target loaded by a tracker.
Events¶
TargetAvailable¶
- C#
public event Action TargetAvailable
Event when ObjectTargetController.Target can be used.
TargetLoad¶
- C#
public event Action< Target , bool> TargetLoad
Target load finish event. The bool value indicates the load success or not.
TargetUnload¶
- C#
public event Action< Target , bool> TargetUnload
Target unload finish event. The bool value indicates the unload success or not.
TargetFound¶
- C#
public event Action TargetFound
Target found event.
TargetLost¶
- C#
public event Action TargetLost
Target lost event.