Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


QualitySettings

This represents the script interface for Quality Settings.
Read time 8 minutesLast updated 2 days ago

Definition

  • Type: Class
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
  • Inherits from: Object
public sealed class QualitySettings : Object

Remarks

Use the
QualitySettings
class to change the current quality level at runtime. You can check the details of quality settings in your project's Quality Settings.

Static Properties

Property

Description

activeColorSpaceActive color space (Read Only).
anisotropicFilteringGlobal anisotropic filtering mode.
antiAliasingChoose the level of Multi-Sample Anti-aliasing (MSAA) that the GPU performs.
asyncUploadBufferSizeSets the ring buffer size used for asynchronous texture and mesh data uploads.
asyncUploadPersistentBufferThis flag determines whether Unity retains the ring buffer allocation used for asynchronous texture and mesh uploads after all upload operations have completed.
asyncUploadTimeSliceSets the time-slice allocated per frame for asynchronous texture and mesh data uploads.
billboardsFaceCameraPositionIf enabled, billboards will face towards camera position rather than camera orientation.
countThe number of Quality Levels.
desiredColorSpaceDesired color space (Read Only).
enableLODCrossFadeEnables or disables LOD Cross Fade.
globalTextureMipmapLimitIndicates how many of the highest-resolution mips of each texture Unity does not upload at the given quality level. To set more specific mipmap limits, you can flag textures to ignore mipmap limits or assign them to mipmap limit groups.
lodBiasGlobal multiplier for the LOD's switching distance.
maximumLODLevelA maximum LOD level. All LOD groups.
maxQueuedFramesMaximum number of frames queued up by graphics driver.
namesThe indexed list of available Quality Settings.
particleRaycastBudgetBudget for how many ray casts can be performed per frame for approximate collision testing.
pixelLightCountThe maximum number of pixel lights that should affect any object.
realtimeGICPUUsageHow much CPU usage to assign to the final lighting calculations at runtime.
realtimeReflectionProbesEnables or disables real-time reflection probes.
renderPipelineThe RenderPipelineAsset that defines the override render pipeline for the current quality level.
resolutionScalingFixedDPIFactorIn resolution scaling mode, this factor is used to multiply with the target Fixed DPI specified to get the actual Fixed DPI to use for this quality setting.
shadowCascade2SplitThe normalized cascade distribution for a 2 cascade setup. The value defines the position of the cascade with respect to Zero.
shadowCascade4SplitThe normalized cascade start position for a 4 cascade setup. Each member of the vector defines the normalized position of the coresponding cascade with respect to Zero.
shadowCascadesNumber of cascades to use for directional light shadows.
shadowDistanceShadow drawing distance.
shadowmaskModeThe rendering mode of Shadowmask.
shadowNearPlaneOffsetOffset shadow frustum near plane.
shadowProjectionDirectional light shadow projection.
shadowResolutionThe default resolution of the shadow maps.
shadowsReal-time Shadows type to be used.
skinWeightsThe maximum number of bones per vertex that are taken into account during skinning, for all meshes in the project.
softParticlesShould soft blending be used for particles?
softVegetationUse a two-pass shader for the vegetation in the terrain engine.
streamingMipmapsActiveEnable automatic streaming of texture mipmap levels based on their distance from all active cameras.
streamingMipmapsAddAllCamerasProcess all enabled Cameras for texture streaming (rather than just those with StreamingController components).
streamingMipmapsMaxFileIORequestsThe maximum number of active texture file IO requests from the texture streaming system.
streamingMipmapsMaxLevelReductionThe maximum number of mipmap levels to discard for each texture.
streamingMipmapsMemoryBudgetThe total amount of memory (in megabytes, or in bytes, depending on your platform) to be used by streaming and non-streaming textures.
streamingMipmapsRenderersPerFrameThe number of renderer instances that are processed each frame when calculating which texture mipmap levels should be streamed.
terrainBasemapDistanceValue set to Terrain.basemapDistance if TerrainQualityOverrides.BasemapDistance is set in QualitySettings.terrainQualityOverrides.
terrainBillboardStartValue set to Terrain.treeBillboardDistance if TerrainQualityOverrides.BillboardStart is set in QualitySettings.terrainQualityOverrides.
terrainDetailDensityScaleValue set to Terrain.detailObjectDensity if TerrainQualityOverrides.DetailDensity is set in QualitySettings.terrainQualityOverrides.
terrainDetailDistanceValue set to Terrain.detailObjectDistance if TerrainQualityOverrides.DetailDistance is set in QualitySettings.terrainQualityOverrides.
terrainFadeLengthValue set to Terrain.treeCrossFadeLength if TerrainQualityOverrides.FadeLength is set in QualitySettings.terrainQualityOverrides.
terrainMaxTreesValue set to Terrain.treeMaximumFullLODCount if TerrainQualityOverrides.MaxTrees is set in QualitySettings.terrainQualityOverrides.
terrainPixelErrorValue set to Terrain.heightmapPixelError if TerrainQualityOverrides.PixelError is set in QualitySettings.terrainQualityOverrides.
terrainQualityOverridesControls which fields should have their values overriden in active Terrains.
terrainTreeDistanceValue set to Terrain.treeDistance if TerrainQualityOverrides.TreeDistance is set in QualitySettings.terrainQualityOverrides.
useLegacyDetailDistributionUse the legacy pre-2022.2 algorithm for distributing details on terrain.
vSyncCountRepresents the number of vertical syncs that should pass between each frame.

Static Methods

Method

Description

DecreaseLevelDecrease the current quality level.
ForEachExecutes the given Action for each tier on the QualitySettings.
GetActiveQualityLevelsForPlatform[Editor Only] Obtains an array with the Quality Level indexes that are selected for the given platform.
GetActiveQualityLevelsForPlatformCount[Editor Only] Obtains the number of Quality Levels that are selected for a given platform.
GetAllRenderPipelineAssetsForPlatform[Editor Only] Fills the given list with all the Render Pipeline Assets on any Quality Level for the given platform. Without filtering by Render Pipeline Asset type or null.
GetQualityLevelReturns the current graphics quality level.
GetQualitySettingsProvides a reference to the QualitySettings object.
GetRenderPipelineAssetAtProvides a reference to the RenderPipelineAsset that defines the override render pipeline for a given quality level.
GetRenderPipelineAssetsForPlatform[Editor Only] Obtains a set with the non null Render Pipeline Assets selected on all the Quality Levels for the given platform.
GetTextureMipmapLimitSettingsRetrieves a copy of the TextureMipmapLimitSettings from a texture mipmap limit group.
IncreaseLevelIncrease the current quality level.
IsPlatformIncluded[Editor Only] Returns if the given platform is included by the Quality Level.
SetLODSettingsSets the lodBias and maximumLODLevel at the same time.
SetQualityLevelSets a new graphics quality level.
SetTextureMipmapLimitSettingsApplies new TextureMipmapLimitSettings to the indicated texture mipmap limit group.
TryExcludePlatformAt[Editor Only] Excludes a platform for the given Quality Level.
TryIncludePlatformAt[Editor Only] Includes a platform to be supported by the Quality Level.

Static Events

Member

Description

activeQualityLevelChangedDelegate that you can use to invoke custom code when Unity changes the current Quality Level.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.