Book Image

Unity 5.x Animation Cookbook

By : Maciej Szczesnik
Book Image

Unity 5.x Animation Cookbook

By: Maciej Szczesnik

Overview of this book

This recipe-based practical guide will show you how to unleash the power of animation in Unity 5.x and make your games visually impeccable. Our primary focus is on showing you tools and techniques to animate not only humanoid biped characters, but also other elements. This includes non-humanoid character animation, game world creation, UI element animation, and other key features such as opening doors, changing lights, transitioning to different scenes, using physics, setting up ragdolls, creating destructible objects and more. While discussing these topics, the book will focus on mecanim, the Unity 3D animation tool, and how you can use it to perform all these tasks efficiently and quickly. It contains a downloadable Unity project with interactive examples for all the recipes. By the end of this book, you will be confident and self-sufficient in animating your Unity 3D games efficiently.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Exporting a 2D sprite animation from a 3D package


Drawing animated 2D sprites can be a challenge. Some artists create their characters in a 3D package and export them as 2D sprites to make the animation process easier. In this first recipe, we will create such a character and export it's animation as a sprite sheet.

Getting ready

Before we start, you need to have an animated model in your chosen 3D package (we are using Blender). You can also download the provided example; open the project in Unity; go to the Chapter 03 2D and user interface animation\Recipe 01 Exporting a 2d sprite animation from a 3d package folder. You will find a scene called Example.unity there, with an animated coin sprite. In the Animation directory, you can find exported frames and a sprite sheet containing them. You can also find a *.blend file with the coin model; set to render out the animation.

How to do it...

To export a 2D sprite animation from a 3D package and import it into Unity, follow these steps:

  1. Create an...