包含此页的版本:
不含此页的版本:
纹理的宽度(以像素为单位)。(只读)
using UnityEngine;public class Example : MonoBehaviour { // Print texture size to the Console Texture texture; void Start() { print("Size is " + texture.width + " by " + texture.height); } }