title: Unity - Prefab with Sub-Elements Expansion Button Missing in Project Panel
body: <p>I have been following along with a course. In this course a GameObject called &quot;Path (0)&quot; is added, this GameObject then has three sub-GameObjects (&quot;Waypoint (0/1/2)&quot;). In the tutorial, the guy drags the parent GameObject &quot;Path (0)&quot; into a folder called Paths in the Project panel to create a prefab. This prefab is shown with a handle to expand it. He then expands this prefab to see the sub-elements which can be dragged into the Inspector, as shown below (expand button highlighted with red box)
  <a href="https://i.stack.imgur.com/To5P7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/To5P7.png" alt="enter image description here" /></a></p>
  <p>When I perform these operations, the Project panel does not have an expand button on the &quot;Path&quot; prefab (see below)</p>
  <p><a href="https://i.stack.imgur.com/Rpi8h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rpi8h.png" alt="enter image description here" /></a></p>
  <p>Why does my prefab object in the Project panel not have these expansion buttons?</p>
  <p>Basically, what he does is he creates a script component with enemy prefab.(attached bellow). and the childobject &quot;waypoints&quot; are marks in scene where enemy will move. I uploaded a part of tutorial on youtube, which i will delete once the problem is solved. if youtube dosent delete it. Please help i am half through the tutorial.</p>
  <p><a href="https://youtu.be/NGpaHSmktic" rel="nofollow noreferrer">https://youtu.be/NGpaHSmktic</a></p>
  <blockquote>
  <p>public class EnemyPathing : MonoBehaviour {
  [SerializeField] List waypoints;
  [SerializeField] float moveSpeed = 2f;
  int waypointIndex = 0;</p>
  <pre><code>void Start()
  {
      transform.position = waypoints[waypointIndex].transform.position;
  }
  
  // Update is called once per frame
  void Update()
  {
      Move();
  }
  
  private void Move()
  {
      if (waypointIndex &lt; -waypoints.Count - 1)
      {
          var targetPosition = waypoints[waypointIndex].transform.position; // this is where we go to
          var movementThisFrame = moveSpeed * Time.deltaTime; // this is how fast we want to go to
          transform.position = Vector2.MoveTowards(transform.position, targetPosition, movementThisFrame);
  
          if (transform.position == targetPosition)
          {
              waypointIndex++;
          }
      }
      else
      {
          Destroy(gameObject);
      }
  }
  </code></pre>
  </blockquote>