Skip to content

Instantly share code, notes, and snippets.

@takashicompany
Created May 13, 2014 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takashicompany/9091a190af859d9b023e to your computer and use it in GitHub Desktop.
Save takashicompany/9091a190af859d9b023e to your computer and use it in GitHub Desktop.
foreach (Transform child in gameObject.transform)でgameObjectの子オブジェクトを参照する
foreach (Transform child in gameObject.transform)
{
// gameObjectの子オブジェクト(child)を操作できる
// 子だけで、孫(子の子)は含まれない
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment