Created
February 5, 2014 03:48
-
-
Save masayuki5160/8817152 to your computer and use it in GitHub Desktop.
親子関係になってるオブジェクトの取得
This file contains 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 child = gameObject.transform.FindChild("GameObjectChild").gameObject; | |
// 孫 | |
GameObject grandSon = gameObject.transform.Find("GameObjectChild/GameObjectGrandSon").gameObject; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考:http://bao-bao.info/blog/archive/2013/09/16/unity_memo_child_parent/