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