Time for action - tag the tray

Save and close the HeartBounce script we'll come back to it in a jiffy. First, let's tag the tray Game Object so that we can determine if the heart has collided with it.

  1. Click on the HandsAndTray Game Object in the Hierarchy panel.
  2. In the Inspector panel, just beneath the Game Object's name, is a dropdown labeled Tag. Choose Add Tag from the bottom of this drop-down list.
  3. We're taken to the Tag Manager. Click on the gray arrow beside the word Tags at the top of the list.
    Time for action - tag the tray
  4. There's an invisible text field next to the line labeled Element 0. This takes a leap of faith the first time you do it. Click on the blank area ...

Get Unity 3D Game Development by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.