• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Nov 06, 2016 at 06:35 PM by tanoshimi for the following reason:

Problem is not reproducible or outdated

avatar image
-1
Question by Zitoox · Nov 03, 2016 at 05:24 PM · animatoranimationswalkingupsetting

Setting up animator

Okay, so... I solved my last question and i am about to accept the answer.

Anyway, i have some nice animations for my character, but i am having a problem. As i said before, i am a horrible animator, and i always tried to avoid the animator, but i have no chance, i am going to make something complex.

I am using the First Person Character, and i am using a rigged model as it's body/corpse. I also have all the animations (dying,walking,jumping,etc...). The problem is that i don't know how to setup the animator.

Could someone write a tutorial for me or something? Please don't just link a page or video. I wanted to learn how to make for an example:

If player is holding W, then continue making the forward walking animation. If he stopped, then make the stop walk animation.

Could someone help me? I would really appreciate if someone could help me on this. Oh, and i am using animator, i am NOT using animation clips.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Nov 06, 2016 at 06:34 PM 1
Share

"Could someone write a tutorial for me or something? Please don't just link a page or video". There are plenty of good tutorials already out there, like this or this, not to mention the manual. Why should anyone spend time and effort rewriting the same information all over again just for you? It creates no new knowledge, makes additional noise, and takes time and attention away from answering other questions on this site, generally making UA less useful for everyone.

1 Reply

  • Sort: 
avatar image
0

Answer by iAmAwsum · Nov 04, 2016 at 09:10 PM

Add an Animation Component to your Player then in the script:

 if(Input.GetKey(KeyCode.W)) {
 gameObject.GetComponent<Animation>().Play("WalkAnim");
 }
 if(!Input.GetKey(KeyCode.W)) {
 gameObject.GetComponent<Animation>().Stop("WalkAnim");
 }

Also don't forget to go into Debug mode in Unity and set your animations into Legacy mode.

Read This and This

This is a very basic code just to demonstrate what you can do. You can also use Animation Events. Event System

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Zitoox · Nov 06, 2016 at 05:06 PM -1
Share

The problem is that everytime i do this my animations get deleted.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

60 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how to solve MissingComponentException: There is no 'Animator' attached to the "Ethan 1" game object 1 Answer

Animator: Adjust speed of Animations at every keyframe? 0 Answers

Replace child of GO with Animator on it 0 Answers

Realistic walking. 1 Answer

Unity freezes when I run animation. How do I fix this? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges