Skip to content

Instantly share code, notes, and snippets.

@takashicompany
Last active August 29, 2015 14:01
Show Gist options
  • Save takashicompany/fd6225738d042c318559 to your computer and use it in GitHub Desktop.
Save takashicompany/fd6225738d042c318559 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