예제 #1
0
        public void OnDestroy()
        {
            ConditionalProperty <int> property = Service.Get <ConditionalConfiguration>().GetProperty <int>(data.QualityIndex.name);

            property.Tier.EDynamicValueChanged -= OnQualityIndexChanged;
            weightingRefresher = null;
            generator          = null;
            if (pool != null)
            {
                pool.UnspawnAllObjects();
            }
            pool = null;
            Requests.Clear();
        }
예제 #2
0
        public void Initialize(LODSystemData systemData)
        {
            generator                  = GetComponent <LODGenerator>();
            weightingRefresher         = GetComponent <LODWeightingRefresher>();
            weightingRefresher.enabled = false;
            data = systemData;
            generator.Initialize(data.ContentKey, systemData.MaxCount);
            ConditionalProperty <int> property = Service.Get <ConditionalConfiguration>().GetProperty <int>(systemData.QualityIndex.name);

            property.Tier.EDynamicValueChanged += OnQualityIndexChanged;
            weightingRefresher.Initialize(data.RefreshRateSeconds);
            initializeMetric();
            setupObjectPool(generator.MaxCount);
        }