QualitySettings.masterTextureLimit 主纹理限制

static var masterTextureLimit : int

Description描述

A texture size limit applied to all 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.

此项设置到1个使用每个纹理的第一个mipmap(因此所有的纹理是一半大小),此项设置到2个使用每个纹理的第二个mipmap(因此所有纹理是四分之一大小),等等...。这个可用于减少对低端电脑的视频内存的要求。默认的值是0。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		QualitySettings.masterTextureLimit = 1;
	}
}
// Use half-size textures.
使用一半大小的纹理

QualitySettings.masterTextureLimit = 1;
Page last updated: 2011-3-13