TextureFormat.Alpha8
Description描述
Alpha-only texture format.
仅Alpha纹理格式。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Start() {
Texture2D texture = new Texture2D(128, 128, TextureFormat.Alpha8, false);
renderer.material.mainTexture = texture;
}
}
function Start () {
// Create a new alpha-only texture and assign it
// to the renderer's material
//创建一个新的仅alpha纹理格式,并指定个渲染器材质
var texture = new Texture2D (128, 128, TextureFormat.Alpha8, false);
renderer.material.mainTexture = texture;
}
参见:Texture2D.Texture2D, texture assets
最后修改:2011年9月18日 Sunday 15:09