AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
AdaptiveQualityExample.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using UnityEngine;
5 using HoloToolkit.Unity;
6 
7 public class AdaptiveQualityExample : MonoBehaviour
8 {
9  public TextMesh Text;
11 
12  private void Update()
13  {
14  Text.text = string.Format("GPUTime:{0:N2}\nQualityLevel:{1}\nViewportScale:{2:N2}",
15  GpuTiming.GetTime("Frame") * 1000.0f,
16  Quality.QualityLevel,
17 #if UNITY_2017_2_OR_NEWER
18  UnityEngine.XR.XRSettings.renderViewportScale);
19 #else
20  UnityEngine.VR.VRSettings.renderViewportScale);
21 #endif
22  }
23 }
Main components for controlling the quality of the system to maintain a steady frame rate...
Encapsulates access to GPU timing methods.
Definition: GpuTiming.cs:14
static double GetTime(string eventId)
Gets the latest available sample time for the given event.
Definition: GpuTiming.cs:33