Esempio n. 1
0
    private GameObject control;                  //the control this vumark currently has

    #endregion                                   // PRIVATE_MEMBER_VARIABLES
    #region UNTIY_MONOBEHAVIOUR_METHODS

    void Start()
    {
        mTrackableBehaviour = GetComponent <VuMarkBehaviour>();
        if (mTrackableBehaviour)
        {
            mTrackableBehaviour.RegisterTrackableEventHandler(this);
        }
    }
        protected override void Start()
        {
            base.Start();

            m_trackableBehaviour = GetComponent <VuMarkBehaviour>();

            if (m_trackableBehaviour)
            {
                OnTrackingLost();

                m_trackableBehaviour.RegisterVuMarkTargetAssignedCallback(() =>
                {
                    Debug.Log("Trackable assigned " + GetTrackableInstanceId());
                });

                m_trackableBehaviour.RegisterVuMarkTargetLostCallback(() =>
                {
                    Debug.Log("Trackable lost " + GetTrackableInstanceId());
                });
                m_trackableBehaviour.RegisterTrackableEventHandler(this);
            }
        }