Class VisionOSRuntimeSettings
Build time settings for visionOS. These are serialized and available at runtime.
Inherited Members
Namespace: UnityEngine.XR.VisionOS
Assembly: Unity.XR.VisionOS.dll
Syntax
public class VisionOSRuntimeSettings : ScriptableObject
Properties
initialMinimumFrameRepeatCount
The minimum number of frames to repeat a rendered frame. Increasing this value from its default of 0 will increase the amount of time you have to render each frame. For example, a value of 1 will repeat each frame one time, resulting in double the amount of time per frame. For a maximum frame rate of 90hz, repeating each frame once will reduce Unity's target frame rate to 45hz. A value of 2 will give you three times the normal amount of time per frame, with a target of 33 hz, and so on. This setting will be used at start-up to decide the target frame rate and initial value provided to the system. You can change this at runtime by setting Application.targetFrameRate and calling VisionOS.SetMinimumFrameRepeatCount. This will be presented as Target Frame Rate in the settings UI.
Declaration
public int initialMinimumFrameRepeatCount { get; set; }
Property Value
Type | Description |
---|---|
int |
initializeHandTrackingOnStartup
Controls if hand tracking should be initialized when the application begins. An XR Hands provider or package (ex: com.unity.xr.hands) is required for hand tracking.
Declaration
public bool initializeHandTrackingOnStartup { get; set; }
Property Value
Type | Description |
---|---|
bool |
setTargetFrameRateOnStartup
Controls if the target frame rate and frame repeat count should be set when the application begins.
Declaration
public bool setTargetFrameRateOnStartup { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
GetTargetFrameRateForRepeatCount(int)
For a given value of repeat count, return the value that should be set on targetFrameRate. This assumes a maximum frame rate of 90hz.
Declaration
public static int GetTargetFrameRateForRepeatCount(int repeatCount)
Parameters
Type | Name | Description |
---|---|---|
int | repeatCount | The repeat count which will be given to SetMinimumFrameRepeatCount(IntPtr, int) |
Returns
Type | Description |
---|---|
int | The target frame rate that should be set on targetFrameRate |