1、动态加载Atlas,并用NGUITools添加Sprite
UIAtlas MyAtlas = Resources.Load("MyAtlas", typeof(UIAtlas)) as UIAtlas;
GameObject bagBox = GameObject.Find("BagBox1");
NGUITools.AddSprite(bagBox, MyAtlas, "start");
NGUITools添加Sprite
2024-03-31 11:00:10
1、动态加载Atlas,并用NGUITools添加Sprite
UIAtlas MyAtlas = Resources.Load("MyAtlas", typeof(UIAtlas)) as UIAtlas;
GameObject bagBox = GameObject.Find("BagBox1");
NGUITools.AddSprite(bagBox, MyAtlas, "start");
NGUITools添加Sprite
下一篇:C# 初识Ref和Out