List
Get the Character's name when tracker activated.
Posted Date: 2018-04-05 15:02     Edited Date: 2018-04-06 8:31     Writer: inactive

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

Posted Date: 2018-04-06 8:31     Edited Date: 2018-04-06 8:31     Writer: slkim

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.