Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     //Debug.Log ("List of trackables currently active: "+TrackableList.countTrackers());
     if (TrackableList.countTrackers() == 0)
     {
         trackerText.text = "Tracking: Not tracker found";
         restartExtTrack();
     }
     else if (TrackableList.countTrackers() == 1)
     {
         if (loadOnceCamera == false)
         {
             loadOnceCamera = true;
             if (currentTrackers.Count > 0)
             {
                 restartExtTrack();
             }
             TrackerManager.Instance.GetTracker <ObjectTracker> ().Start();
             foreach (TrackableBehaviour tb in TrackableList.getActiveTrackables())
             {
                 trackerText.text = "Tracking: " + tb.TrackableName;
                 Debug.Log("Tracking: " + tb.TrackableName + " status: " + tb.CurrentStatus);
                 if (startAugmentation(tb))
                 {
                     office3D.transform.parent = tb.gameObject.transform;
                     Debug.Log("Cool1");
                     tb.GetComponent <ObjectTargetBehaviour> ().ObjectTarget.StartExtendedTracking();
                     Debug.Log("Cool2");
                 }
             }
         }
     }
     else if (TrackableList.countTrackers() > 1)
     {
         restartExtTrack();
     }
 }