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);
 }
Example #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();
         }
     }
 }
Example #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();
             }
         }
     }
 }
Example #4
0
 /// <summary> Use this for initialization. </summary>
 void Start()
 {
     m_TrackableBehaviour = GetComponent <NRTrackableBehaviour>();
 }