Ejemplo n.º 1
0
        private void TrackerRegistered(StatsTracker registeredTracker)
        {
            PerformanceTracker.Instance.OnTrackerRegistered -= TrackerRegistered;

            if (registeredTracker.Key == PerformanceTracker.GetKeyNameFromEnum(type))
            {
                tracker = registeredTracker;
            }
        }
Ejemplo n.º 2
0
        public void AddTracker(string key, StatsTracker tracker)
        {
            trackersMap.Add(key, tracker);
            Trackers.Add(tracker);

            if (OnTrackerRegistered != null)
            {
                OnTrackerRegistered(tracker);
            }
        }
Ejemplo n.º 3
0
        private void GetTracker()
        {
            if (PerformanceTracker.Instance == null)
            {
                return;
            }

            tracker = PerformanceTracker.Instance.GetTracker(type);

            if (tracker == null)
            {
                PerformanceTracker.Instance.OnTrackerRegistered -= TrackerRegistered;
                PerformanceTracker.Instance.OnTrackerRegistered += TrackerRegistered;
            }
        }