Hello everyone.
I got an error, and I don’t know how to fix it. The error is that the text of the TextMesh cannot update immediately when I update that text in the code. But when I use Debug.Log I see the text is changed but it does not show immediately, when I change it to other value, it shows the previous text that I changed.
Here is the sample code I got that errors.
public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult)
{
GameObject newImageTarget = Instantiate (ImageTargetTemplate.gameObject) as GameObject;
string metadata = targetSearchResult.MetaData;
ImageTargetBehaviour imageTargetBehaviour = mImageTracker.TargetFinder.EnableTracking(targetSearchResult, newImageTarget) as ImageTargetBehaviour;
user_info.text = metadata;//user_info is the text mesh that I get in Start() method
Debug.LogWarning ("text mesh: "+user_info.text);
Debug.LogWarning ("Metadata Value: " + metadata);
}
The code I use in my cloud recognition with vuforia extension.