Quality Settings 的脚本接口。
可以有任意数量的品质设置。在项目的 Quality Settings 中设置每项品质设置的 详细信息。在运行时, 可以使用该类更改当前品质级别。
activeColorSpace | 活动颜色空间(只读)。 |
anisotropicFiltering | 全局各向异性过滤模式。 |
antiAliasing | Choose the level of Multi-Sample Anti-aliasing (MSAA) that the GPU performs. |
asyncUploadBufferSize | 异步纹理和网格数据上传可在渲染线程上以基于时间片的方式异步上传纹理和网格数据,同时对内存和时间切片进行严格的控制。除了驱动程序必须进行的分配以外,不进行任何其他分配。为了读取数据和上传纹理及网格数据,Unity 将重用一个大小可控的环形缓冲区。使用 asyncUploadBufferSize 设置异步纹理和网格数据上传的缓冲区大小。此大小以兆字节 (MB) 为单位。最小值为 2,最大值为 512。缓冲区将自动调整大小以适应当前加载的最大纹理。为了避免重新调整缓冲区大小可能带来的性能开销,请将该值设置为近似于场景中使用的最大纹理的大小。 |
asyncUploadPersistentBuffer | 此标志控制在没有活动加载操作的情况下是否仍然分配异步上传管线的环形缓冲区。 要在所有上传操作完成后保持环缓冲区分配,请将其设置为 true。 如果遇到内存使用过多的问题,可以将其设置为 false。这意味着可以减少运行时内存占用,但可能会出现内存碎片。 默认值为 true。 |
asyncUploadTimeSlice | 异步纹理上传可在渲染线程上以基于时间片的方式异步上传纹理,同时对内存和时间切片进行严格的控制。除了驱动程序必须进行的分配以外,不进行任何其他分配。为了读取数据和上传纹理数据,将重用一个大小可控的环形缓冲区。使用 asyncUploadTimeSlice 设置每帧的 异步纹理上传时间片(以毫秒为单位)。最小值为 1,最大值为 33。 |
billboardsFaceCameraPosition | 如果启用,公告牌将面向摄像机位置而不是摄像机方向。 |
desiredColorSpace | 所需的颜色空间(只读)。 |
lodBias | 细节级别切换距离的全局乘数。 |
masterTextureLimit | A texture size limit applied to most textures. |
maximumLODLevel | 最大细节级别。所有细节级别组。 |
maxQueuedFrames | 图形驱动程序排队的最大帧数。 |
names | 可用品质设置的索引列表。 |
particleRaycastBudget | 关于每帧可执行多少次射线投射以进行近似碰撞测试的预算。 |
pixelLightCount | 会影响任何对象的最大像素光照数。 |
realtimeReflectionProbes | Enables real-time reflection probes. |
renderPipeline | The RenderPipelineAsset that defines the override render pipeline for the current quality level. |
resolutionScalingFixedDPIFactor | 在分辨率缩放模式下,该因子用于与指定的目标固定 DPI 相乘,以获得用于该品质设置的实际固定 DPI。 |
shadowCascade2Split | 2 级联设置的标准化级联分布。该值定义级联相对于零的位置。 |
shadowCascade4Split | 4 级联设置的标准化级联起始位置。向量的每个成员定义相应级联相对于零的标准化位置。 |
shadowCascades | 用于方向光阴影的级联数。 |
shadowDistance | 阴影绘制距离。 |
shadowmaskMode | 阴影遮罩的渲染模式。 |
shadowNearPlaneOffset | 对阴影视锥体近平面进行偏移处理。 |
shadowProjection | 方向光阴影投影。 |
shadowResolution | 阴影贴图的默认分辨率。 |
shadows | Real-time Shadows type to be used. |
skinWeights | The 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 级别的最大数量。 |
streamingMipmapsMemoryBudget | 串流和非串流纹理使用的内存总量。 |
streamingMipmapsRenderersPerFrame | The number of renderer instances that are processed each frame when calculating which texture mipmap levels should be streamed. |
vSyncCount | The number of vertical syncs that should pass between each frame. |
DecreaseLevel | 降低当前的品质级别。 |
GetQualityLevel | 返回当前的图形品质级别。 |
GetQualitySettings | Provides a reference to the QualitySettings object. |
GetRenderPipelineAssetAt | Provides a reference to the RenderPipelineAsset that defines the override render pipeline for a given quality level. |
IncreaseLevel | 提高当前的品质级别。 |
SetLODSettings | Sets the lodBias and maximumLODLevel at the same time. |
SetQualityLevel | 设置新的图形品质级别。 |
GetInstanceID | Gets the instance ID of the object. |
ToString | 返回对象的名称。 |
Destroy | 移除 GameObject、组件或资源。 |
DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
DontDestroyOnLoad | 在加载新的 Scene 时,请勿销毁 Object。 |
FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | 克隆 original 对象并返回克隆对象。 |
bool | 该对象是否存在? |
operator != | 比较两个对象是否引用不同的对象。 |
operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.