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
1
Question by importguru88 · Jul 17, 2016 at 11:02 PM · controllertransitionparametersstateany

Error: Transition '' in state 'AnyState' uses parameter 'Death' which does not exist in controller. UnityEditor.DockArea:OnGUI()

I am trying to play death animation from anystate . I got this error : Transition '' in state 'AnyState' uses parameter 'Death' which does not exist in controller. UnityEditor.DockArea:OnGUI()

     void Start () 
      {
            anim = GetComponent<Animator> ();
      }


   if (m_DeactivateOnDeath) {
                 Scheduler.Schedule(m_DeactivateOnDeathDelay, Deactivate);
                     GetComponent<AudioSource>().Play();
                     anim.SetTrigger("Dead");
             }
         }
 
Comment
Add comment · Show 3
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 importguru88 · Jul 17, 2016 at 11:04 PM 0
Share

This is all of the code I have.

avatar image importguru88 · Jul 17, 2016 at 11:16 PM 0
Share

I can only play the death animation only when I click Buy the other animations don't play.

avatar image importguru88 · Jul 17, 2016 at 11:34 PM 0
Share

I change the typo error. I gotten this error : Parameter 'Death' does not exist. UnityEngine.Animator:SetTrigger(String)

Here is the code again :

 if (m_DeactivateOnDeath) {
                 Scheduler.Schedule(m_DeactivateOnDeathDelay, Deactivate);
                     GetComponent<AudioSource>().Play();
                     anim.SetTrigger("Death");
             }
         }

1 Reply

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

Answer by IvovdMarel · Jul 17, 2016 at 11:45 PM

The 'Trigger' refers to a parameter that you have create in your animator.

Go to Window > Animator

In the top left corner you will see both 'Layers' and 'Parameters'

Click Parameters

Click on the little plus icon

Select Trigger

Give it the name 'Death'

Select the Transition (white arrow) from Any State to your Death animation

In the Inspector-window, under the blue graph, you should see a list of conditions

Click on the plus

Select the Death parameter

Comment
Add comment · Show 4 · 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 importguru88 · Jul 18, 2016 at 12:01 AM 0
Share

I did that. I got this error now Parameter 'Death' does not exist. UnityEngine.Animator:SetTrigger(String).

Here is a pic of the animatior controller.

alt text

die-parameter.png (217.9 kB)
avatar image importguru88 · Jul 18, 2016 at 12:04 AM 0
Share

Here is another pic . I still can't get the animation to work .alt text

aaeae.png (239.8 kB)
avatar image importguru88 · Jul 18, 2016 at 12:07 AM 0
Share

When I click on the death parameter it will play and stay play and wont play the other animations.

avatar image MaxKarpinsky · May 13, 2017 at 09:15 AM 0
Share

I have got the same issue as OP, but this answer doesn't answer the question. He is just simply showing how to trigger animations.

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

49 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

Related Questions

Mecanim new Trigger parameter explanation? 1 Answer

(Unity/Mixamo) Animation won't play all frames 2 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Change parameters 0 Answers

How do I transition from Any State to Die State On My animator controller properly 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