Version: 2021.3
언어: 한국어
public static int masterTextureLimit ;

설명

A texture size limit applied to most textures.

Setting this to one uses the first mipmap of each texture (so all textures are half size), setting this to two uses the second mipmap of each texture (so all textures are quarter size), etc.. This can be used to decrease video memory requirements on low-end computers. The default value is zero.

At run time, if you set masterTextureLimit to a mipmap value that has been stripped (see PlayerSettings.mipStripping), Unity sets the value to the closest mipmap value that has not been stripped.

Master texture only works on regular 2D textures. It does not adjust other texture types such as cubemaps or array textures. The master texture limit quality setting also has no effect on non-mipmapped textures.

In the following cases, 2D textures are not affected by the master texture limit: - Built-in editor resources such as UI icons and elements - Textures created at run time which are not readable, for example, after calling Apply with makeNoLongerReadable set to true - Non peristent textures, when EditorUtility.IsPersistent returns false - Rendertargets - Terrain masks

The width and height of the texture object report the original, non-limited sizes. You may have to take this into account if you perform special sampling or processing with textures subject to the master limit quality setting, and you use masterTextureLimit > 1.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Use half-size textures. QualitySettings.masterTextureLimit = 1; } }