Skip to content

Instantly share code, notes, and snippets.

@masayuki5160
Created February 5, 2014 03:48
Show Gist options
  • Save masayuki5160/8817152 to your computer and use it in GitHub Desktop.
Save masayuki5160/8817152 to your computer and use it in GitHub Desktop.
親子関係になってるオブジェクトの取得
// 子
GameObject child = gameObject.transform.FindChild("GameObjectChild").gameObject;
// 孫
GameObject grandSon = gameObject.transform.Find("GameObjectChild/GameObjectGrandSon").gameObject;
@masayuki5160
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment