Unity3D 动态创建图集并压入精灵(NGUI)

private void createAtlas(Texture2D tex)
{
    GameObject testAtlas=new GameObject (“testAtlas”);
    DynamicUIAtlas atlas=testAtlas.AddComponent();
    atlas.Create();
    string sprName="testSpr";
    atlas.AddSprite(tex,sprName);
}

 

你可能感兴趣的:(unity3D,Unity3D)