Version: 2023.1

QualitySettings

class in UnityEngine

/

继承自:Object

切换到手册

描述

This represents the script interface for Quality Settings.

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.

静态变量

activeColorSpace活动颜色空间(只读)。
anisotropicFiltering全局各向异性过滤模式。
antiAliasingChoose the level of Multi-Sample Anti-aliasing (MSAA) that the GPU performs.
asyncUploadBufferSize异步纹理和网格数据上传可在渲染线程上以基于时间片的方式异步上传纹理和网格数据,同时对内存和时间切片进行严格的控制。除了驱动程序必须进行的分配以外,不进行任何其他分配。为了读取数据和上传纹理及网格数据,Unity 将重用一个大小可控的环形缓冲区。Use asyncUploadBufferSize to set the buffer size for asynchronous texture and mesh data uploads. The minimum value is 2 megabytes and the maximum value is 2047 megabytes. The buffer resizes automatically to fit the largest texture currently loading. To avoid a buffer resize (which can use extra system resources) set this value to the size of the largest texture in the Scene. If you have issues with excessive memory usage, you may need to reduce the value of this buffer or disable asyncUploadPersistentBuffer. Memory fragmentation can occur if you choose the latter option.
asyncUploadPersistentBuffer此标志控制在没有活动加载操作的情况下是否仍然分配异步上传管线的环形缓冲区。 要在所有上传操作完成后保持环缓冲区分配,请将其设置为 true。 如果遇到内存使用过多的问题,可以将其设置为 false。这意味着可以减少运行时内存占用,但可能会出现内存碎片。 默认值为 true。
asyncUploadTimeSlice异步纹理上传可在渲染线程上以基于时间片的方式异步上传纹理,同时对内存和时间切片进行严格的控制。除了驱动程序必须进行的分配以外,不进行任何其他分配。为了读取数据和上传纹理数据,将重用一个大小可控的环形缓冲区。使用 asyncUploadTimeSlice 设置每帧的 异步纹理上传时间片(以毫秒为单位)。最小值为 1,最大值为 33。
billboardsFaceCameraPosition如果启用,公告牌将面向摄像机位置而不是摄像机方向。
countThe number of Quality Levels.
desiredColorSpace所需的颜色空间(只读)。
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.
lodBias细节级别切换距离的全局乘数。
maximumLODLevel最大细节级别。所有细节级别组。
maxQueuedFrames图形驱动程序排队的最大帧数。
names可用品质设置的索引列表。
particleRaycastBudget关于每帧可执行多少次射线投射以进行近似碰撞测试的预算。
pixelLightCount会影响任何对象的最大像素光照数。
realtimeGICPUUsage在运行时为最终光照计算分配多少 CPU 使用率。
realtimeReflectionProbesEnables or disables real-time reflection probes.
renderPipelineThe RenderPipelineAsset that defines the override render pipeline for the current quality level.
resolutionScalingFixedDPIFactor在分辨率缩放模式下,该因子用于与指定的目标固定 DPI 相乘,以获得用于该品质设置的实际固定 DPI。
shadowCascade2Split2 级联设置的标准化级联分布。该值定义级联相对于零的位置。
shadowCascade4Split4 级联设置的标准化级联起始位置。向量的每个成员定义相应级联相对于零的标准化位置。
shadowCascades用于方向光阴影的级联数。
shadowDistance阴影绘制距离。
shadowmaskMode阴影遮罩的渲染模式。
shadowNearPlaneOffset对阴影视锥体近平面进行偏移处理。
shadowProjection方向光阴影投影。
shadowResolution阴影贴图的默认分辨率。
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.
softParticles是否应为粒子使用软混合?
softVegetation对地形引擎中的植被使用双通道着色器。
streamingMipmapsActive根据与所有活动摄像机的距离启用纹理 Mipmap 级别的自动串流。
streamingMipmapsAddAllCameras处理所有已启用的摄像机以进行纹理串流(不仅仅是包含 StreamingController 组件的摄像机)。
streamingMipmapsMaxFileIORequests来自纹理串流系统的活动纹理文件 IO 请求的最大数量。
streamingMipmapsMaxLevelReduction要为每个纹理丢弃的 Mipmap 级别的最大数量。
streamingMipmapsMemoryBudgetThe total amount of memory (in megabytes) 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 terrainQualityOverrides.
terrainBillboardStartValue set to Terrain.treeBillboardDistance if TerrainQualityOverrides.BillboardStart is set in terrainQualityOverrides.
terrainDetailDensityScaleValue set to Terrain.detailObjectDensity if TerrainQualityOverrides.DetailDensity is set in terrainQualityOverrides.
terrainDetailDistanceValue set to Terrain.detailObjectDistance if TerrainQualityOverrides.DetailDistance is set in terrainQualityOverrides.
terrainFadeLengthValue set to Terrain.treeCrossFadeLength if TerrainQualityOverrides.FadeLength is set in terrainQualityOverrides.
terrainMaxTreesValue set to Terrain.treeMaximumFullLODCount if TerrainQualityOverrides.MaxTrees is set in terrainQualityOverrides.
terrainPixelErrorValue set to Terrain.heightmapPixelError if TerrainQualityOverrides.PixelError is set in terrainQualityOverrides.
terrainQualityOverridesControls which fields should have their values overriden in active Terrains.
terrainTreeDistanceValue set to Terrain.treeDistance if TerrainQualityOverrides.TreeDistance is set in 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.

静态函数

DecreaseLevel降低当前的品质级别。
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.
GetQualityLevel返回当前的图形品质级别。
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.
IncreaseLevel提高当前的品质级别。
IsPlatformIncluded[Editor Only] Returns if the given platform is included by the Quality Level.
SetLODSettingsSets the lodBias and maximumLODLevel at the same time.
SetQualityLevel设置新的图形品质级别。
SetTextureMipmapLimitSettingsApplies new TextureMipmapLimitSettings to the indicated texture mipmap limit group.
TryExcludePlatformAt[Editor Only] Excludes a platfor for the given Quality Level.
TryIncludePlatformAt[Editor Only] Includes a platform to be supported by the Quality Level.

Events

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

继承的成员

变量

hideFlags该对象应该隐藏、随场景一起保存还是由用户修改?
name对象的名称。

公共函数

GetInstanceIDGets the instance ID of the object.
ToString返回对象的名称。

静态函数

Destroy移除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoad在加载新的 Scene 时,请勿销毁 Object。
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
Instantiate克隆 original 对象并返回克隆对象。

运算符

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。