それを作成したスプライトに割り当てようとしたら
以下の警告が出たが、解決したのでメモ。
[Warning]
-----------------------------------------
You can't place widgets on a layer different than the UIPanel that manages them.
If you want to move widgets to a different layer, parent them to a new panel instead.
-----------------------------------------
// このコードは警告が表示される (This code is displayed warning.)
//---------------------------------------------------------------
GameObject obj = new GameObject ("SpriteObjName");
UISprite sp = obj.AddComponent <uisprite> ();
sp.atlas = yourLoadedAtlas;
sp.spriteName = "yourSpriteName";
obj.transform.parent = GameObject.Find("yourParentOfTheSprite").transform;
// このコードは大丈夫 (This code have not warning.)
//---------------------------------------------------------------
UISprite sp = NGUITools.AddSprite ( GameObject.Find("yourParentOfTheSprite"), yourLoadedAtlas, "SpriteObjName" );
sp.spriteName ="yourSpriteName";
スプライトを作る時は NGUITools.AddSprite を使おう。