动态加载切换Atlas资源

来源:互联网 发布:罗马之子优化 编辑:程序博客网 时间:2024/06/05 10:22
using UnityEngine;using System.Collections;public class Test : MonoBehaviour {    GameObject a;    public UIAtlas at;// Use this for initializationvoid Start () {        a = GameObject.Find("Invisible_Widget");        }// Update is called once per framevoid Update () {}    public void ButtonClick()    {             UISprite b = NGUITools.AddSprite(a, at, "Pinky");        b.MakePixelPerfect();    }    }

0 0