- Sort Posts
- 7 replies
- Last post
UDT keep track of trackable to delete or replace
An ImageTarget's GameObject can be referenced from its ImageTargetBehavior component, here are some examples using the TrackableBehaviour, which ImageTargetBehavior inherits from - https://developer.vuforia.com/resources/dev-guide/swappable-databases-unity
I guess what I mean is that foreach(trackable in trackables...) ... referencing trackable doesn't seem to allow calling trackable.GetComponent<ImageTargetBehaviour>, as trackable doesn't contain a def for GetComponent
I'm still not sure how you are referencing ImageTargetBehaviour or the parent gameobject of the trackable...
UDT keep track of trackable to delete or replace
To obtain child objects of the IT GameObject you can provide a path to the go.transform.Find([path]) method.
http://docs.unity3d.com/Documentation/ScriptReference/Transform.Find.html
How do you know the child object you get via Find() corresponds to the trackable you have destroyed or referenced in the loop snippet below?
UDT keep track of trackable to delete or replace
An ImageTarget's GameObject can be referenced from its ImageTargetBehavior component, here are some examples using the TrackableBehaviour, which ImageTargetBehavior inherits from - https://developer.vuforia.com/resources/dev-guide/swappable-databases-unity
To obtain child objects of the IT GameObject you can provide a path to the go.transform.Find([path]) method.
http://docs.unity3d.com/Documentation/ScriptReference/Transform.Find.html
UDT keep track of trackable to delete or replace
UDT keep track of trackable to delete or replace
You can iterate through the trackables as such..
IEnumerable<Trackable> trackables = mBuiltDataSet.GetTrackables(); Trackable oldest = null; foreach (Trackable trackable in trackables){ ImageTarget it = (ImageTarget) trackable; Debug.Log( it.GetSize() ); if (oldest == null || trackable.ID < oldest.ID) oldest = trackable; }
How would you identify that they are capturing the target at a poor angle?
(up)