O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required