Hi,
Could you please provide further details as requested once you created the post:
Thx and greetings
Nicola
Wikitude SDK : Professional Edition v9.2
Unity : 2019.4.4f
Thank you.
Hi,
I merged those 2 threads as they are dealing with the same topic and having multiple topics for the same issue is very hard to follow.
As for the answer time, the question is already assigned to our core team and they will get back to you once they are on the support tasks. Please note that response times may vary.
Thx and greetings
Nicola
Hello,
After changing the target path during runtime, the tracker has to be re-initialized to load the new target collection.
That can be done like this:
public void ChangeTargetCollection() { if (isCameraWayLeft) { _Tracker.TargetCollectionResource.TargetPath = "sorento_left.wto"; _Trackable.TargetPattern = "*"; } else { _Tracker.TargetCollectionResource.TargetPath = "sorento_right.wto"; _Trackable.TargetPattern = "*"; } GameObject oldTracker = _Tracker.gameObject; GameObject newTracker = Instantiate(oldTracker, Vector3.zero, Quaternion.identity, oldTracker.transform.parent.transform); DestroyImmediate(oldTracker); _Tracker = newTracker.GetComponent<ObjectTracker>(); _Trackable = newTracker.GetComponentInChildren<ObjectTrackable>(); }
Kind regards,
Gökhan
수종 신
Hello,
In the script, I would like to change the Tracker's Target Collection to another WTO file.
I tried changing TargetPath in Tracker.TargetCollectionResource, but only what was seen in the Inspector was changed, and the target perceived by the actual tracker remained unchanged.
How do I change the WTO file when I want to script it and recognize the target of the WTO file?