Hi everyone, I got the solution for who might using vuforia 6.x with unity 5.3x.
it took me about a week to study n finally it works for me by follow Mr fathahnoor's provided script.
in which u have to amend some of the codes by the following:
1.in order to use Json to call the metadata from the cloud markers, you need to download (for me) Newtonsoft.json.dll into your Plugins folder by the link:
http://www.newtonsoft.com/json. (cause i really can't find any Json.dll on web) - "NET 20"
n (for Android) change the Api Compatibility Level to .NET2.0 (under Player Setting), else will be error to build / play.
* import package of vuforia sample6-0-12 (content Cloud Reco) n videoPlayback sample in which i amend the scene "Vuforia-3-CloudReco".
2.edit CloudRecoEventHandle.cs by amended the codes as fathahnoor was stated.
Due to the different .dll is applying, i change the script to:
//not using Json;
public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult)
if(targetSearchResult.MetaData == null)
//no neccesory to apply SerializeObject here...
string output = JsonConvert.SerializeObject (targetSearchResult.MetaData);
JObject dict = JsonConvert.DeserializeObject<JObject> (targetSearchResult.MetaData);
Debug.Log("We got a target metadata: " + dict["title"]);
VideoPlaybackBehaviour video = ImageTargetTemplate.gameObject.GetComponentInChildren<VideoPlaybackBehaviour>();
if(video != null)
if(video.VideoPlayer.Load((string) dict["title"], VideoPlayerHelper.MediaType.ON_TEXTURE, false, 0) == false)
// First clear all trackables
// enable the new result with the same ImageTargetBehaviour:
ImageTargetBehaviour imageTargetBehaviour = mObjectTracker.TargetFinder.EnableTracking(targetSearchResult, mParentOfImageTargetTemplate) as ImageTargetBehaviour;
//if extended tracking was enabled from the menu, we need to start the extendedtracking on the newly found trackble.
if (mTrackableSettings && mTrackableSettings.IsExtendedTrackingEnabled())
3.add "video" prefab under child of CloudRecoTarget/ attach playVideo.cs to AR camera/ attach TrackableEventHandler.cs to CloudRecoTarget (remove CloudRecoTrackableEventHandler)... /attach videoTapHandle.cs to sample UI, etc, as a setup progress for implement video playback.
4. a very tricky thing here is that, i have to put a video url link to the "path" (var under video > videoPlaybackBehaviour.cs) ,else, the marker would not detacted (error) by my android device.
Then it may work!
* of course, dont forget to apply license.
hope my post will help.