Texture.height 高度
var height : int
Description描述
Height of the texture in pixels (Read Only)
以像素为单位的贴图的高度(只读)
C#
JavaScript
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);}