Time for action – creating the target

We have all the pieces; the next step is to put them together.

  1. Start by dragging the Target model from the Project window to the Hierarchy window. This creates a new instance of the target object.
  2. By selecting the new target object, we can see that it already has an Animator component attached; we just need to add a reference to AnimatorController that we created. Do this by dragging TargetController from the Project window and dropping it on the Animator component's Controller field, just as with all the other object references we have set up so far.
  3. Also, we need to add the Target script to the object and connect a reference to the Animator component in its relevant field.
  4. The last thing to do to the target ...

Get Unity Android Game Development by Example Beginner's Guide 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.