ObjectTargetController Class¶
Description¶
MonoBehaviour which controls ObjectTarget in the scene, providing a few extensions in the Unity environment. Use ObjectTargetController.Target directly when necessary.
Target data will be loaded separately. It will start after session start. The full data loading will happen only once in the life time, if the session stops before load finish, it will be restarted in the next session start.
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() |
private void Update() |
private void OnDestroy() |
Fields¶
SourceType¶
- C#
public ObjectTargetController.DataSource SourceType
Target data source. Set before MonoBehaviour .Start.
ObjFileSource¶
- C#
public ObjectTargetController.ObjFileSourceData ObjFileSource
Obj file data source for target creation. Valid when ObjectTargetController.SourceType == ObjectTargetController.DataSource.ObjFile . Set before MonoBehaviour .Start.
TargetSource¶
- C#
public ObjectTarget TargetSource
Target source when using a target already created. Valid when ObjectTargetController.SourceType == ObjectTargetController.DataSource.Target . Set before MonoBehaviour .Start.
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 ObjectTrackerFrameFilter which loads the target. When set to null, the target will be unloaded from tracker previously set. Modify at any time, the load will happen only when the session is running.
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.
Events¶
TargetDataLoad¶
- C#
public event Action<bool> TargetDataLoad
Target data finish load (not load into a tracker).
TargetFound¶
- C#
public event Action TargetFound
Target Found event.
TargetLost¶
- C#
public event Action TargetLost
Target Lost event.