Can anyone tell me how to retrieve the metadata string in Unity using C#.
what is metadata here, just i uploaded image target in a cloud dabase and strucked with metadata . What is this metadata ? how can i create metadata to upload in a cloud databse ?
Thanks in advance. please share your ideas to resolve my problem.
Like I said below:
gives you the metadata
If you output this using Debug.Log for the sample it should show something like samplebook1.json which is the content of the metadata file pertaining to that target.
Check the source and you will find references to metadata in the callback below.
/// Handles new search results
/// <param name="targetSearchResult"></param>
public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult)
// This code demonstrates how to reuse an ImageTargetBehaviour for new search results and modifying it according to the metadata
// Depending on your application, it can make more sense to duplicate the ImageTargetBehaviour using Instantiate(),
// or to create a new ImageTargetBehaviour for each new result
// Vuforia will return a new object with the right script automatically if you use
// TargetFinder.EnableTracking(TargetSearchResult result, string gameObjectName)
//Check if the metadata isn't null
if(targetSearchResult.MetaData == null)
// enable the new result with the same ImageTargetBehaviour:
ImageTargetBehaviour imageTargetBehaviour = mImageTracker.TargetFinder.EnableTracking(targetSearchResult, mParentOfImageTargetTemplate);
if (imageTargetBehaviour != null)
// stop the target finder
mCloudRecoBehaviour.CloudRecoEnabled = false;
// Calls the TargetCreated Method of the SceneManager object to start loading
// the BookData from the JSON
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?