Book Image

Unity Animation Essentials

By : Alan Thorn
Book Image

Unity Animation Essentials

By: Alan Thorn

Overview of this book

Table of Contents (14 chapters)
Unity Animation Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Animation with sprites


After you've imported a set of sprite objects, either as individual images or as atlas textures, you're ready to start animating with them using a single technique. Achieving this is really simple, at least initially. From the Unity Project panel, just select all sprites that go together as a complete animation sequence, and then drag and drop them as one into the Scene Hierarchy panel. Dropping them into the scene or game tabs won't work; it must be inside the hierarchy panel. For example, drag and drop the player run animation sequence (from this book's files) into the scene. When you do this, Unity displays a Save dialog, prompting you to create a new animation sequence asset (.anim is the file extension).

Assign the animation a name (such as PlayerRun.anim) and then click on Save.

A player character created from multiple frames

A sprite object is created in the scene, and it should be visible in the Scene and Game tabs. If it's not, make sure that the object is positioned...