Unity3D 中数组定义贴图代码
Posted on 2013 年 03 月 18 日 by U3d / Unity3D 脚本/插件/被围观 280 次
Unity3D 中数组定义贴图代码,按 F1 键动态改变贴图。
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour
{
//宣告 gameobject
public GameObject ani;
//宣告 textureObject 物件用來放置貼圖物件
public GameObject textureObject;
//宣告 textures 陣列用來放置貼圖
public Texture[] textures;
//宣告變數 y 來變化貼圖
private int y=0;
void Start()
{