public int width ;

Description

纹理的宽度(以像素为单位)。(只读)

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Texture texture; void Start() { print("Size is " + texture.width + " by " + texture.height); } }