1. Code
  2. Coding Fundamentals
  3. Game Development

Importing an Animated Character Into Unity 3D

Scroll to top
Read Time: 3 min
What You'll Be Creating

Unity 3D is one of the most popular open-source game engines available today. Along with an easy-to-use interface, it allows you to import files from most major designing programs, such as Maya (.mb or .ma), Cinema 3D (.c4d, .c3d), Studio Max (.max), and Blender (fbx.). 

At first, importing a character into Unity can seem intimidating. In this tutorial, I hope to make it simple, so that you may bring your carefully sculpted character to life!

Finding Free Animations

If you have created your own animations, that's awesome—we will discuss importing them into Unity shortly. If you've created your character or would like to purchase a stock character, let's talk about where we can find some. 

Mixamo is a great option (recently purchased by Adobe). They provide basic free animations and custom bone rigging that can animate your character in minutes. Once you sign up, you can choose different characters and animation kits. Separately, you can use the free preset animations from Unity or purchase animation packages from the Unity Asset Store.

Mixamo HomepageMixamo HomepageMixamo Homepage

Open Unity

Open UnityOpen UnityOpen Unity

Since this tutorial is about importing an animated character, we won't get into the specifics about Unity. Let's open Unity by starting a new project. 

Tip: Unity understands the T-Pose, so before importing your character, aim to save him in a default T-pose. 

Preparing Your World

Start a new folderStart a new folderStart a new folder

Your character may have many different components, and that's why it's important to create a new folder. Right click on the Project Window > Create > New Folder. For the purpose of this tutorial, let's name it character

Add a planeAdd a planeAdd a plane

Now let's add a plane for our character to stand on. Go to GameObject >3D Object > Plane. We will also need to adjust the camera by moving the arrow for a better view. 

Adjust the cameraAdjust the cameraAdjust the camera

Importing Your Character

Time to import your character. Click and drag your character's file (fbx, cd3, etc.) into the folder you created in Unity. All of your character's elements, including materials, will be imported into the same file.

Imported characterImported characterImported character

Setting Up Your Rig

To set up the rig, right click your character and choose humanoid. A new window will open with your character, and this is where Unity attempts to match your character's rig (muscles and bones). 

Rigging your characterRigging your characterRigging your character

A good rig match will show in green. See the example below.

Rig MatchRig MatchRig Match

After your character is configured, click Done and Configure. Save your scene. We can now drag your character into the game world.

Save scene after configurationSave scene after configurationSave scene after configuration

Animator Controller Basics

Time to add his animation. Go to Create > Animator Controller, and name it MyController.

Adding an Animator ControllerAdding an Animator ControllerAdding an Animator Controller

After you add the animator controller, you will see a new tab. This is where we will add our character's animation. You may have multiple animations, but for the purpose of this tutorial we will talk about adding one. Each State (box) will represent an animation.

Adding animation to the controllerAdding animation to the controllerAdding animation to the controller

Click on the clock to the right of Motion. A window will open with your imported animations, so click and drag one into that box. 

Tip: The default animation will be in orange.

To edit your animation settings, double click on the State. A box will open under the Inspector Window. Here you can edit the speed and loop time if you wish your animation to loop.

Adding a TransitionAdding a TransitionAdding a Transition

When you right click on a state, you can create transitions. This is used for multiple animations—for example, walk to run. Let's right click and create a New State, and then add a transition from Entry to New State. See the example above.

Tip: You can use your middle mouse button to zoom in and out.

Adding the controller to the characterAdding the controller to the characterAdding the controller to the character

Go to the Scene tab and click on your character. You can now drag your animator controller into the controller box in the Inspector Window. See the example above.

Let's Play

In conclusion, you should now have an understanding of how to import and add an animation to the animator controller. 

Time to see our character in action. Click the Play button on top of the Scene Window. Congratulations! You have just imported your animated character into Unity!

Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.