Importing an animated model into Unity typically involves bringing a 3D model file containing animation data, such as an FBX file, into your project's Assets folder and configuring its animation settings within Unity.
Importing Your Animated Model File
The first step is to bring the animated 3D model file into your Unity project. This is a straightforward process managed directly within the Unity editor.
Here’s how to import your model file:
- Right-click in your Unity Assets folder within the Project window.
- From the context menu that appears, select Import New Asset....
- Browse to the location of your animated model file (for example, an FBX file containing both the model and animation data) and select it.
- Click the Import button.
The imported model file will now appear in your Assets folder. If it contains animation data, a small dropdown arrow will appear next to it, allowing you to see the animation clips embedded within the file.
Configuring Animation Settings in Unity
Once imported, you need to configure how Unity should handle the animation data. This is done in the Inspector window after selecting the imported model file.
Follow these steps to configure the animation rig:
- Select the imported animated model file in your Assets folder.
- In the Inspector window, navigate to the Rig tab.
- Under the Animation Type setting, choose Humanoid if the model represents a human-like character. Other options like Generic might be used for non-humanoid characters or objects.
- Click the Apply button at the bottom of the Inspector window to save these changes.
By setting the Animation Type to Humanoid, Unity can leverage its Humanoid animation system, enabling features like Mecanim and retargeting animations between different Humanoid models. The animation clips contained within the imported file will now be properly configured and ready to be used with an Animator component on a GameObject in your scene.