Version: 2021.2
言語: 日本語
public static int masterTextureLimit ;

説明

A texture size limit applied to most textures.

この値を 1 に設定すると、各テクスチャの最初のミップマップを使用し (そのため、すべてのテクスチャサイズは 2 分の 1)、 2 に設定すると、各テクスチャの 2 番目のミップマップを使用します (そのため、すべてのテクスチャサイズは 4 分の 1)。 これを利用して、ローエンドなコンピューターのビデオメモリーの必要条件を減少することができます。 デフォルト値は 0 です。

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; } }