Last active
August 3, 2017 10:20
-
-
Save matsuyoro/9f5362ff60fc34dfaf0436578dab7930 to your computer and use it in GitHub Desktop.
Unity5 NGUIで、NGUITools.AddChildしたものの実体を参照する ref: http://qiita.com/matsuyoro/items/b021c716e89cb8ec4f8a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GameObject prefab = (GameObject)Resources.Load("Prefabs/UI/Balloons/BtnBalloon") as GameObject; | |
GameObject BalloonPrefab = NGUITools.AddChild(BalloonParentObj, prefab);// NGUIに追加 帰り値で、prefabの実体を参照 | |
Destroy(BalloonPrefab,4f); //4秒後に追加したprefabを削除 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment