void Awake() { mPopUpMsg = GetComponent<SampleInitErrorHandler>(); if(!mPopUpMsg) { mPopUpMsg = gameObject.AddComponent<SampleInitErrorHandler>(); } // Check for an initialization error on start. QCARAbstractBehaviour qcarBehaviour = (QCARAbstractBehaviour)FindObjectOfType(typeof(QCARAbstractBehaviour)); if (qcarBehaviour) { qcarBehaviour.RegisterQCARInitErrorCallback(OnQCARInitializationError); } }
void Awake() { mPopUpMsg = GetComponent<SampleInitErrorHandler>(); if(!mPopUpMsg) { mPopUpMsg = gameObject.AddComponent<SampleInitErrorHandler>(); } // Check for an initialization error on start. VuforiaAbstractBehaviour vuforiaBehaviour = (VuforiaAbstractBehaviour)FindObjectOfType(typeof(VuforiaAbstractBehaviour)); if (vuforiaBehaviour) { vuforiaBehaviour.RegisterVuforiaInitErrorCallback(OnVuforiaInitializationError); } }
void Awake() { mPopUpMsg = GetComponent <SampleInitErrorHandler>(); if (!mPopUpMsg) { mPopUpMsg = gameObject.AddComponent <SampleInitErrorHandler>(); } // Check for an initialization error on start. QCARAbstractBehaviour qcarBehaviour = (QCARAbstractBehaviour)FindObjectOfType(typeof(QCARAbstractBehaviour)); if (qcarBehaviour) { qcarBehaviour.RegisterQCARInitErrorCallback(OnQCARInitializationError); } }
void Awake() { mPopUpMsg = GetComponent <SampleInitErrorHandler>(); if (!mPopUpMsg) { mPopUpMsg = gameObject.AddComponent <SampleInitErrorHandler>(); } // Check for an initialization error on start. VuforiaAbstractBehaviour vuforiaBehaviour = (VuforiaAbstractBehaviour)FindObjectOfType(typeof(VuforiaAbstractBehaviour)); if (vuforiaBehaviour) { vuforiaBehaviour.RegisterVuforiaInitErrorCallback(OnVuforiaInitializationError); } }
void Start() { mPopUpMsg = GetComponent<SampleInitErrorHandler>(); if (!mPopUpMsg) { mPopUpMsg = gameObject.AddComponent<SampleInitErrorHandler>(); } mPopUpMsg.InitPopUp(); // register callback methods QCARAbstractBehaviour qcarBehaviour = (QCARAbstractBehaviour)FindObjectOfType(typeof(QCARAbstractBehaviour)); if (qcarBehaviour) { qcarBehaviour.RegisterQCARStartedCallback(OnQCARStarted); qcarBehaviour.RegisterQCARInitErrorCallback(OnQCARInitializationError); } //Assign all references m_reconstructionBehaviour = FindObjectOfType(typeof(ReconstructionBehaviour)) as ReconstructionBehaviour; m_uiInput = new GUIInputManager(); m_cylinderTrackableHandler = FindObjectOfType(typeof(CylinderTrackableEventHandler)) as CylinderTrackableEventHandler; m_smartTerrainEventHandler = GameObject.FindObjectOfType(typeof(SmartTerrainEventHandler)) as SmartTerrainEventHandler; m_smartSurface = GameObject.FindObjectOfType(typeof(SurfaceBehaviour)) as SurfaceBehaviour; m_smartTerrainTrackableHandler = GameObject.FindObjectOfType(typeof(SmartTerrainTrackableEventHandler)) as SmartTerrainTrackableEventHandler; //Register to events m_cylinderTrackableHandler.CylinderTrackableFoundFirstTime += OnCylinderTrackableFoundFirstTime; m_uiInput.TappedOnDoneButton += OnTappedOnDone; m_uiInput.TappedOnResetButton += OnTappedOnReset; }