Log in or register to post comments

3D model is not displaying in CloudReco

October 7, 2014 - 1:32am #1

Hi,

I followed this link https://developer.vuforia.com/forum/faq/unity-how-can-i-augment-my-image-target-model and it's working on ImageTarget. But when i use the same script in cloud reco it's not working. I'm getting the url value from metadata but it's not showing as a 3D model. 

 

if(targetSearchResult.MetaData != null)
{
StartCoroutine(DownloadAndCache());
 
//StartCoroutine(DownloadMyBundle(1.0F));
}
 
mTargetMetadata = targetSearchResult.MetaData;
 
JSONObject json = JSONObject.Parse(mTargetMetadata);
 
string type=json.GetString("type");
url=json.GetString("overlay3d");
 
IEnumerator DownloadAndCache() {
while(!Caching.ready)
yield return null;
 
using (WWW www = WWW .LoadFromCacheOrDownload(url, Version)) {
yield return www;
 
if (www .error != null)
throw new UnityException("WWW Download had an error: " + www .error);
 
AssetBundle bundle = www .assetBundle;
if (AssetName == "") {
mBundleInstance = Instantiate (bundle.mainAsset) as GameObject;
}
else {
mBundleInstance = Instantiate(bundle.Load (AssetName)) as GameObject;
}
}
}
 

 

3D model is not displaying in CloudReco

October 14, 2014 - 3:38pm #2
Log in or register to post comments