Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by LevyNagy · Apr 16, 2016 at 12:52 PM · animationcharacterlegacy

How to set legacy on an animation?

Hi guys.

So I am new to Unity, I was reading a lot of answers but non helped me. I am struggling with this for 4 days now.

I imported the following animations from the asset store: Raw Mocap Data for Mecanim https://www.assetstore.unity3d.com/en/#!/content/5330

And when I attach any of the animations to my character I get the following message:

 Animation component 'Flash' must be marked as Legacy.

I triend the following

  1. Set animation and my character to legacy from Inspector / Rig / Animation type legacy, but this way the animation is not playing, but no messages

  2. Tried to mark animation as legacy form inspector, I clicked the clip selected Debug mode, tried to check the legacy checkbox, but it's grayed out.

  3. Duplicated the animation, again tried to mark animation as legacy form inspector, I clicked the clip selected Debug mode, tried to check the legacy checkbox, but it's still grayed out.

Could please any of you can give me a hint?

I am using Unity 5..3.4f1

Thank you

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Picc_Excellence · Apr 17, 2016 at 06:46 AM

I loaded the free Raw mocap data and got it to work with this list of steps

  1. Download project

  2. Create a plane (for avatar to stand on) and drag in default avatar.

  3. Make sure avatar rig is set to humanoid

  4. Create animator controller in animations folder (or wherever you like to keep it.)

  5. Apply the animator controller to avatar.

  6. Open animator controller and drag desired idle animation into it. Then drag in desired run animation. Click on animation reference, create a new animation called run and crop so it will loop. I used JogForward_NtrlFaceFwd.fbx. I cropped the time from frame 56 to 78 for loop.

  7. Add a character controller and attach it to avatar.

  8. Create animator controller script (see example below) and apply it to avatar.

This process will avoid legacy all together and the animations will work and you wont ever have to redo anything when Unity removes Legacy animation. To add more animations, drag them into your controller and make transitions from idle to the new animations and set parameters. For instance, I used bool and called it run in the animator controller. Make sure the bool name matches the name of the animation box in the animator controller (I always rename the box... click on it to do this.) Also, make sure you delete the default main camera so it doesn't conflict with the character controller one.

That's it.

Here is the C# code I added to the avatar...

 using UnityEngine;
 using System.Collections;
 
 public class defaultAnimator : MonoBehaviour {
 
     Animator def;
 
     public bool run = true;
 
     // Use this for initialization
     void Start () {
         def = GetComponent<Animator>();
     }
     
     // Update is called once per frame
     void Update () {
       if(Input.GetKey(KeyCode.W) || Input.GetKey (KeyCode.S) || Input.GetKey (KeyCode.A) || Input.GetKey (KeyCode.D))
       {
         def.SetBool("run", true);
       } else {
           def.SetBool("run", false);
       }
     }
 }

Comment
Add comment · Show 2 · 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 LevyNagy · Apr 18, 2016 at 09:13 AM 0
Share

Thnaks, i will try it out now

avatar image LevyNagy · Apr 18, 2016 at 10:52 AM 0
Share

Thank you, it worked like a charm, thanks so much

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Can Mecanim & Legacy animation be used on the same character? 1 Answer

Why do legacy & humanoid animations look different on the same character? 1 Answer

Legacy Animations ignore Rotation 0 Answers

How to handle multiple animation variants 1 Answer

import softimage mod tool 7.5 to unity, good or not? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges