IEnumerator Begin() { yield return(new WaitForSeconds(1)); factory = FindObjectOfType <SampleFactory>(); bottleneckUI = FindObjectOfType <BottleneckUI>(); factory.RunTest = false; timer = waitTimeBeforeSwitch; ap = Holder.Instance; if (ap == null || !ap.Active) { state = "Adaptive Performance not active"; Debug.Log("[AP Bottleneck] Adaptive Performance not active"); FinishTest(); } else { timeOuttimer = timeOut; watch.Start(); factory.prefab = cpuLoader; factory.RunTest = true; state = "Ramping up CPU load"; StartCoroutine(ObserveBottleneck()); markers.Add(new Marker { label = state, time = watch.ElapsedMilliseconds, objectCount = factory.internalObjs }); Debug.Log("[AP Bottleneck] Starting Test"); } bottleneckStatus.text = state; }
void Start() { ap = Holder.Instance; if (ap == null) { Debug.Log("[Thermal Visualization] Warning Adaptive Performance Manager was not found and does not report"); return; } ap.ThermalStatus.ThermalEvent += OnThermalEvent; }
void Start() { ap = Holder.Instance; if (ap == null) { return; } ap.PerformanceStatus.PerformanceBottleneckChangeEvent += OnBottleneckChange; }
void Start() { ap = Holder.Instance; if (ap == null || !ap.Active) { Debug.Log("[AP BoostUI] Adaptive Performance not active"); return; } ap.PerformanceStatus.PerformanceBoostChangeEvent += OnBoostModeEvent; Activate(CPUNoBoost); Activate(GPUNoBoost); }
void Start() { ap = Holder.Instance; if (ap == null) { return; } originalLimitCount = objectFactory.LimitCount; ap.ThermalStatus.ThermalEvent += OnThermalEvent; StartCoroutine(TestTimeout()); }
void Start() { ap = Holder.Instance; if (ap == null || !ap.Active) { Debug.Log("[AP ClusterInfo] Adaptive Performance not active."); return; } if (!ap.SupportedFeature(UnityEngine.AdaptivePerformance.Provider.Feature.ClusterInfo)) { notSupported.gameObject.SetActive(true); Debug.Log("[AP ClusterInfo] Feature not supported."); } ClusterInfo = ap.PerformanceStatus.PerformanceMetrics.ClusterInfo; AssignClusterInfo(ClusterInfo); }
void Start() { ap = Holder.Instance; if (ap == null || !ap.Active) { Debug.Log("[AP APC] Adaptive Performance not active"); enabled = false; return; } // The game starts in a menu and we want to save power ap.DevicePerformanceControl.CpuLevel = 3; ap.DevicePerformanceControl.GpuLevel = 3; ap.PerformanceStatus.PerformanceBottleneckChangeEvent += OnBottleneckChange; ap.ThermalStatus.ThermalEvent += OnThermalEvent; checkStatus(); maxCpuPerformanceLevel = ap.DevicePerformanceControl.MaxCpuPerformanceLevel; maxGpuPerformanceLevel = ap.DevicePerformanceControl.MaxGpuPerformanceLevel; }
void Start() { ap = Holder.Instance; if (ap == null || !ap.Active) { Debug.Log("[AP APC] AP is not Active"); enabled = false; return; } var seq = GameObject.Find("TestSequencer"); sequence = seq.GetComponent <TestSequence>(); loop = sequence.loop; autoMode = sequence.autoMode; ap.DevicePerformanceControl.AutomaticPerformanceControl = AutoControlMode; ap.DevelopmentSettings.Logging = true; ap.DevelopmentSettings.LoggingFrequencyInFrames = 200; Debug.Log($"Auto Performance Control overrides settings automatic performance mode to {ap.DevicePerformanceControl.AutomaticPerformanceControl},logging to {ap.DevelopmentSettings.Logging}."); // The base cycle amount for one test sequence loopCycles = 1; // If Auto mode is enabled, we're not using the loopCycles if (autoMode) { loop = false; // Since loopCycles won't be decremented, a value of 2 means it will be running forever loopCycles = 2; } if (loop) { loopCycles = sequence.loopCycles; } watch.Start(); LogResult("Test start"); ap.ThermalStatus.ThermalEvent += OnThermalEvent; StartCoroutine(continuousLogging()); }
void Start() { factory = FindObjectOfType <SampleFactory>(); bottleneckUI = FindObjectOfType <BottleneckUI>(); factory.RunTest = false; ap = Holder.Instance; if (ap == null || !ap.Active) { state = "Adaptive Performance not active"; Debug.Log("[AP Boost] Adaptive Performance not active"); return; } else { watch.Start(); state = "Waiting on Load"; targetBottleneck = PerformanceBottleneck.TargetFrameRate; Debug.LogFormat("[AP Boost] Starting Test Timestamp : {0} s , Label : {1} , Objects : {2} \n", watch.ElapsedMilliseconds / 1000f, state, factory.internalObjs); } bottleneckStatus.text = state; ap.PerformanceStatus.PerformanceBoostChangeEvent += OnBoostModeEvent; }