Texture.width 宽度
var width : int
Description描述
Width of the texture in pixels (Read Only)
基于像素的贴图宽度(只读)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Texture texture;
void Start() {
print("Size is " + texture.width + " by " + texture.height);
}
}
// Print texture size to the Console
//输出贴图大小到控制台
var texture : Texture;
function Start () {
print("Size is " + texture.width + " by " + texture.height);
}
最后修改:2010年12月14日 Tuesday 17:53