Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

[Help] Scripting Overview, Controlling GameObjects Using Components question.

Discussion in 'Documentation' started by silvermirai, Aug 12, 2017.

  1. silvermirai

    silvermirai

    Joined:
    Jul 26, 2017
    Posts:
    1
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    2,352
    Transform implements IEnumerable. When you iterate over a transform, you get all the children of that transform (one level deep).

    So that bit of code simply sets the waypoint array to be all the transform children of the transform the scipt is attached to. It's a bit convoluted.