VirtualRealityDeviceLifecycle
An abstract class in Root.Township, the global namespace.
Base DeviceLifecycle for VR headsets (SteamVRDeviceLifecycle and OpenXRDeviceLifecycle build on it), adding adaptive render resolution. Client only.
Constructors
Fields
| Member | What it is |
|---|
protected List<Pose> poses | Tracked poses list for subclasses. SteamVRDeviceLifecycle hides it with its own list. |
3 private and internal fields
| Member | What it is |
|---|
private static Logger logger | Logger for this class. |
private float maximumAdaptiveResolution | Highest render scale (1.0), raised if the eye texture scale is already higher. |
private float minimumAdaptiveResolution | Lowest render scale allowed (0.7). |
Properties
| Member | What it is |
|---|
bool IsAdaptiveResolutionEnabled { get; private set; } | Turns on adaptive viewport scaling each frame. Its setter is private and never called, so it's always false. |
Methods
| Member | What it is |
|---|
override void Update() | Runs UpdateAdaptiveResolution each frame when adaptive resolution is on. |
protected virtual float CalculateRecommendedResolutionScale(float minimum, float maximum) | Override to pick a render scale between the minimum and maximum. The base returns the maximum. |
1 private and internal method
| Member | What it is |
|---|
private void UpdateAdaptiveResolution() | Raises the eye texture scale to the maximum, then sets XRSettings.renderViewportScale from the recommended scale. |