Пример #1
0
    private void onVuMarkBehaviourFound(VuMarkBehaviour pVuMarkBehaviour)
    {
        if (registeredBehaviours.Contains(pVuMarkBehaviour))
        {
            //    Debug.Log("Previously tracked VumarkBehaviour found (" + pVuMarkBehaviour.name + ")");
        }
        else
        {
            //    Debug.Log("Newly tracked VumarkBehaviour found (" + pVuMarkBehaviour.name + ")");
            //    Debug.Log("Registering for VuMarkTargetAssignedCallbacks from " + pVuMarkBehaviour.name);

            //if we hadn't registered yet, we do so now
            registeredBehaviours.Add(pVuMarkBehaviour);

            pVuMarkBehaviour.RegisterVuMarkTargetAssignedCallback(
                () => vumarkTargetAssigned(pVuMarkBehaviour)
                );
        }
    }
        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);
            }
        }
Пример #3
0
 public void Awake()
 {
     texMapper = GetComponent <TextureMapper>();
     vumark.RegisterVuMarkTargetAssignedCallback(GetVumarkID);
 }