Class VisionOSSettings
Holds settings that are used to configure the Apple visionOS XR Plug-in.
Implements
Inherited Members
Namespace: UnityEditor .XR.VisionOS
Assembly: Unity.XR.VisionOS.Editor.dll
Syntax
[Serializable]
[XRConfigurationData("Apple visionOS", "UnityEditor.XR.VisionOS.VisionOSSettings")]
public class VisionOSSettings : ScriptableObject, IPackageSettings
Properties
appMode
App mode.
Declaration
public VisionOSSettings.AppMode appMode { get; set; }
Property Value
Type | Description |
---|---|
Vision |
currentSettings
Get or set the Vision
Declaration
public static VisionOSSettings currentSettings { get; set; }
Property Value
Type | Description |
---|---|
Vision |
foveatedRendering
Controls if foveated rendering is enabled or disabled. This setting only applies to Virtual Reality apps. Foveated rendering requires the Universal Render Pipeline.
Declaration
public bool foveatedRendering { get; set; }
Property Value
Type | Description |
---|---|
bool |
handsTrackingUsageDescription
Hands tracking usage description (added to Info.plist).
Declaration
public string handsTrackingUsageDescription { get; set; }
Property Value
Type | Description |
---|---|
string |
il2CPPLargeExeWorkaround
Setting that determines if the IL2CPP_LARGE_EXECUTABLE_ARM_WORKAROUND flag is used when building an Xcode project.
Declaration
public bool il2CPPLargeExeWorkaround { get; set; }
Property Value
Type | Description |
---|---|
bool |
mrImmersionStyle
The ImmersionStyle to be used for the MR ImmersiveSpace.
Declaration
public VisionOSSettings.ImmersionStyle mrImmersionStyle { get; set; }
Property Value
Type | Description |
---|---|
Vision |
skipPresentToMainScreen
XR setting to signal to Unity that it should not try to present frames to the main screen. This setting was previously disabled to work around an issue that caused Unity versions prior to 2022.3.42f1 to leak GPU resources. In Unity 2022.3.42f1 and above, enabling this setting will fix a known issue with frame pacing on visionOS. Do not modify this setting from its default value unless you have a specific reason. It should be enabled on Unity 2022.3.42f1 and above, and disabled otherwise.
Declaration
public bool skipPresentToMainScreen { get; set; }
Property Value
Type | Description |
---|---|
bool |
upperLimbVisibility
Upper limb visibility setting (currently only set at the beginning of an app)
Declaration
public bool upperLimbVisibility { get; set; }
Property Value
Type | Description |
---|---|
bool |
vrImmersionStyle
The ImmersionStyle to be used for the VR ImmersiveSpace.
Declaration
public VisionOSSettings.ImmersionStyle vrImmersionStyle { get; set; }
Property Value
Type | Description |
---|---|
Vision |
worldSensingUsageDescription
World sensing usage description (added to Info.plist).
Declaration
public string worldSensingUsageDescription { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GetOrCreateRuntimeSettings()
Declaration
public VisionOSRuntimeSettings GetOrCreateRuntimeSettings()
Returns
Type | Description |
---|---|
Vision |
GetOrCreateSettings()
Gets the currently selected settings, or creates default settings if no Vision
Declaration
public static VisionOSSettings GetOrCreateSettings()
Returns
Type | Description |
---|---|
Vision |
The visionOS settings to use for the current Player build. |
ImmersionStyleToString(ImmersionStyle)
Convert the immersionStyle setting to a string that can be written into Swift code generated during the build process.
Declaration
public static string ImmersionStyleToString(VisionOSSettings.ImmersionStyle immersionStyle)
Parameters
Type | Name | Description |
---|---|---|
Vision |
immersionStyle | The state of the immersion style setting. |
Returns
Type | Description |
---|---|
string | Swift code that can be used for build postprocessors. |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if the value of immersionStyle isn't one of the known values (Automatic, Full, Mixed, or Progressive) |
UpperLimbVisibilityToString(bool)
Convert the upperLimbVisibility setting to a string that can be written into Swift code generated during the build process.
Declaration
public static string UpperLimbVisibilityToString(bool upperLimbVisibility)
Parameters
Type | Name | Description |
---|---|---|
bool | upperLimbVisibility | The state of the upper limb visibility setting. |
Returns
Type | Description |
---|---|
string | Swift code that can be used for build postprocessors. |