public static NRTrackableAccessor Create(NRTrackableBehaviour target)
 {
     if (target is NRTrackableImageBehaviour)
     {
         return(new NRImageTargetAccessor((NRTrackableImageBehaviour)target));
     }
     Debug.LogError(target.GetType().ToString() + "is not derived from NRTrackableImageBehaviour");
     return(null);
 }
Beispiel #2
0
 private void UpdateTrackableProperties(NRTrackableBehaviour[] trackables)
 {
     for (int i = 0; i < trackables.Length; i++)
     {
         NRTrackableBehaviour trackableBehaviour = trackables[i];
         NRTrackableAccessor  trackableAccessor  = NRAccessorFactory.Create(trackableBehaviour);
         if (trackableAccessor != null)
         {
             trackableAccessor.ApplyDataProperties();
         }
     }
 }
Beispiel #3
0
 private void UpdateTrackableAppearance(NRTrackableBehaviour[] trackables)
 {
     if (!Application.isPlaying)
     {
         for (int i = 0; i < trackables.Length; i++)
         {
             NRTrackableBehaviour trackableBehaviour = trackables[i];
             NRTrackableAccessor  trackableAccessor  = NRAccessorFactory.Create(trackableBehaviour);
             if (trackableAccessor != null)
             {
                 trackableAccessor.ApplyDataAppearance();
             }
         }
     }
 }
Beispiel #4
0
 /// <summary> Use this for initialization. </summary>
 void Start()
 {
     m_TrackableBehaviour = GetComponent <NRTrackableBehaviour>();
 }