void Update() { if (listeners.Count == 0 && currentTracker.IsTracking()) { currentTracker.DisableTracking(); } else if (listeners.Count != 0 && !currentTracker.IsTracking()) { currentTracker.EnableTracking(); } currentTracker.DoUpdate(); }
private void SetupTracker() { if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) { currentTracker = bodyTrackerNative; //bodyTrackerNative.EnableTracking (); } else if (useWebcamInEditor) { currentTracker = bodyTrackerMono; //bodyTrackerMono.EnableTracking (); bodyTrackerKeyboard.DisableTracking(); } else { currentTracker = bodyTrackerKeyboard; bodyTrackerMono.DisableTracking(); //bodyTrackerKeyboard.EnableTracking (); } currentTracker.SetPlayerCount(playerCount); }