コード例 #1
0
    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);
        }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
    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);
        }
    }
コード例 #4
0
    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);
        }
    }
コード例 #5
0
ファイル: UIStateManager.cs プロジェクト: scobb/hackathon
    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;
    }