Beispiel #1
0
        private void TrackerRegistered(StatsTracker registeredTracker)
        {
            PerformanceTracker.Instance.OnTrackerRegistered -= TrackerRegistered;

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

            if (OnTrackerRegistered != null)
            {
                OnTrackerRegistered(tracker);
            }
        }
Beispiel #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;
            }
        }