VRCQualitySettings
A thin read-only layer over properties of UnityEngine.QualitySettings.
Currently exposed:
int AntiAliasing
int PixelLightCount
float LODBias
int MaximumLODLevel
ShadowResolution ShadowResolution
float ShadowDistance
int ShadowCascades
int vSyncCount
Some of these may be affected by the user's graphics settings.
Shadow Distance
You can override the shadow distance in your world using VRCQualitySettings.SetShadowDistance()
. In VRChat, the value is clamped between 0.1f
and 10000.0f
.
SetShadowDistance()
takes four float parameters: low
, medium
, high
, and mobile
. These correspond to the "Low", "Medium" and "High" shadow quality settings in the graphics settings menu. If you specify different values, the parameter that matches the local user's current setting is used. mobile
applies to all non-PC platforms, regardless of settings. If you want to use the same value for all four parameters, use the overload method of SetShadowDistance()
that accepts a single parameter.
Once you set a shadow distance using this property, the user's configured "Shadow Quality" setting will be overridden. The user will see a warning in their graphics settings. Be careful what you set as your shadow distance, since larger values can have heavy performance implications.
To disable the override and go back to the user configured shadow distance value, you can call VRCQualitySettings.ResetShadowDistance()
.
OnChanged Event
When a user changes graphics settings that affect an exposed property, the OnVRCQualitySettingsChanged event is triggered.