How to import Mixamo Characters in Unity - Unity Animation Tutorial 05

Опубликовано: 29 Январь 2023
на канале: ChidresTechTutorials
6,523
405

Notes for You:: How to import Mixamo Characters in Unity - Unity Animation Tutorial 05

- Goto https://www.mixamo.com/
- Login with Facebook

- Go to Characters Tab
- Search and Select “Amy”

Download character with mesh and idle animation:
- Go to Animations Tab
- Search for “Happy Idle” and click on it
- Click on Download button
- Choose
Format: Fbx for Unity
Skin: With Skin (means with mesh and textures)
FPS: 30
Keyframe Reduction: None
- Click on Download Button

Download character with only animation[ i.e. without mesh]:
- Search for “Run Forward” and click on it
- Tick the In Place checkbox
- Click on Download button
- Choose
Format: Fbx for Unity
Skin: Without Skin (means without mesh and textures i.e. only animation)
FPS: 30
Keyframe Reduction: None
- Click on Download Button

Rename Imported FBX files:
- Rename to Amy_Happy_Idle
- Rename to Amy_Run_Forward

Importing FBX files to Unity:
- Drag and drop both fbx files to Models folder

Fixing Texture Issue:
Note: if you do not find textures applied
- Select Amy_Happy_Idle.fbx file
- Go to Materials Tab
- Choose Use External Materials (Legacy) from Location dropdown
- Click on Apply button – Click on Fix now button


Adding Model to Scene:
- Drag and drop Amy_Happy_Idle.fbx file to Scene
- Reset position and rotate around y axis by 180
- Rename it to “Amy”


Creating Animator Controller
- Create Animator Controller inside Animations Folder
- Name it [Amy_Anim_Controller]

Assigning Animator Controller to game object:
- Select Amy game object
- Add Animator Component
- Drag and drop Amy_Anim_Controller to Controller property of the Animator Component.

Creating Animation State Machine:
- Open Amy_Anim_Controller by double clicking on it
- From the Amy_Happy_Idlefbx file – Duplicate Animation Clip – Rename it [Amy_Idle_Animation]
- Enable Loop Time
- Drag and drop to Amy_Anim_Controller
-Play and Test [You must see Idle Animation Playing]

- From the Amy_Run_Forwardfbx file – Duplicate Animation Clip – Rename it [Amy_Run_Forward_Animation]
- Enable Loop Time
- Drag and drop to Amy_Anim_Controller
- Make a Transition from Amy_Idle_Animation state to Amy_Run_Forward_Animation state
-Play and Test [You must see Idleanimation & Run Animations Playing]


Idle Run & Jump Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Amy_Controller : MonoBehaviour
{
Animator animator;
Rigidbody rigidbody;
void Start()
{
animator = this.GetComponent<Animator>();
rigidbody = this.GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
if(Input.GetKey(KeyCode.W))
{
this.transform.Translate(new Vector3(0f, 0f, 3f) * Time.deltaTime,Space.Self);
animator.SetInteger("state", 1);
}
else if(Input.GetKeyUp(KeyCode.Space))
{
rigidbody.AddForce(new Vector3(0f, 300f, 0f));
animator.SetInteger("state", 2);

}
else
{
animator.SetInteger("state", 0);
}

if (Input.GetKey(KeyCode.W) && Input.GetKeyUp(KeyCode.Space))
{
this.transform.Translate(new Vector3(0f, 0f, 3f) * Time.deltaTime, Space.Self);
rigidbody.AddForce(new Vector3(0f, 300f, 0f));
animator.SetInteger("state", 1);
}
}
}

Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.


=========================================

Follow the link for previous video:
   • How to use Animation Parameters in Un...  

=========================================

Unity Animation Tutorials Playlist:-
   • Unity Animation Tutorials  

=========================================
Watch My Other Useful Tutorials:-

Unity Tutorials Playlist:-
   • Unity Engine Tutorials  

Unity Lighting Tutorials Playlist:-
   • Unity Lighting Tutorials  

Unity Camera Tutorials Playlist:-
   • Unity Camera Tutorials  

Unity Particle System Tutorials Playlist:-
   • Unity Particle System Tutorials  

Unity Physics System Tutorials Playlist:-
   • Unity Physics System Tutorials  

Unity C-Sharp Scripting Tutorials Playlist:-
   • Unity C# Scripting Tutorials  

=========================================

Subscribe to our YouTube channel:-
   / chidrestechtutorials  

Join as Member of our YouTube channel:-
https://www.youtube.com/chidrestechtu...

Become our Patron:-
  / chidrestechtutorials  

Visit our Website:-
https://www.chidrestechtutorials.com

=========================================
Hash Tags:-
#ChidresTechTutorials #Unity #UnityAnimationTutorial


Смотрите видео How to import Mixamo Characters in Unity - Unity Animation Tutorial 05 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь ChidresTechTutorials 29 Январь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 6,523 раз и оно понравилось 405 людям.