Get the Character's name when tracker activated.
Hi,
How can I get the character name when tracker of that's character activated ? So I can put it at the Name.text at UI layer.
Sorry I'm still newbie. Thanks
if your platform is Unity,
first find function 'Update' in TrackerSample script..
maybe you can find this script.
TrackingState state = TrackerManager.GetInstance().UpdateTrackingState();
TrackingResult trackingResult = state.GetTrackingResult();
for (int i = 0; i < trackingResult.GetCount(); i++)
{
Trackable trackable = trackingResult.GetTrackable(i);
imageTrackablesMap[trackable.GetName()].OnTrackSuccess(
trackable.GetId(), trackable.GetName(), trackable.GetPose());
}
imageTrackablesMap[trackable.GetName()] is TrackableBehaviour what you is tracking.
imageTrackablesMap[trackable.GetName()] is child of GameObject.
you can get Name for GameObject.