Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Vuforia Unity - Why my ImageTargetTemplate is null?

$
0
0
Hi, Im working in a Vuforia project and I need to know why my ImageTargetTemplate variable is null. This is my code: public class CloudRecoEventHandler : MonoBehaviour, ICloudRecoEventHandler { public ImageTargetBehaviour ImageTargetTemplate; public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult) { if (!ImageTargetTemplate) ShowText += " HERE EVER IS NULL"; IEnumerator GetAssetBundle() { www = new WWW(BundleURL); yield return www; AssetBundleRequest request; try { request = www.assetBundle.LoadAssetAsync("king", typeof(GameObject)); } catch (Exception) { throw; } GO = Instantiate(request.asset, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject; if (ImageTargetTemplate) /// NULLLLLL EVERRRRRR!!! MF ;( { ObjectTracker tracker = TrackerManager.Instance.GetTracker(); tracker.TargetFinder.EnableTracking(TargetResults, ImageTargetTemplate); } if (ImageTargetTemplate) { GO.transform.parent = ImageTargetTemplate.gameObject.transform; ////////////// NEVER do it !!!!!!!! } GO.SetActive(true); Please, can you help me? Thank you, best regards.

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>