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
;
10
public
AdaptiveQuality
Quality
;
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
}
HoloToolkit.Unity.AdaptiveQuality
Main components for controlling the quality of the system to maintain a steady frame rate...
Definition:
AdaptiveQuality.cs:15
HoloToolkit.Unity.GpuTiming
Encapsulates access to GPU timing methods.
Definition:
GpuTiming.cs:14
HoloToolkit.Unity.GpuTiming.GetTime
static double GetTime(string eventId)
Gets the latest available sample time for the given event.
Definition:
GpuTiming.cs:33
AdaptiveQualityExample.Text
TextMesh Text
Definition:
AdaptiveQualityExample.cs:9
AdaptiveQualityExample.Quality
AdaptiveQuality Quality
Definition:
AdaptiveQualityExample.cs:10
HoloToolkit
HoloToolkit.Unity.AdaptiveQuality.QualityLevel
int QualityLevel
Definition:
AdaptiveQuality.cs:35
UnityEngine
AdaptiveQualityExample
Definition:
AdaptiveQualityExample.cs:7
HoloToolkit.Unity
Assets
HoloToolkit-Examples
AdaptiveQuality
AdaptiveQualityExample.cs
Generated by
1.8.12