Question by
srhdaninja · Mar 11, 2016 at 08:04 PM ·
animationerrorslide
error CS1501: No overload for method 'SetBool' takes 1 arguments
I'm trying to make a transition from idle to slide by pressing left shift but i got this error, here is the code. Please help.
}
private void HandleSlide()
{
if (slide)
{
myAnimator.SetBool ("slide");
}
}
Comment
Best Answer
Answer by Zoogyburger · Mar 11, 2016 at 08:11 PM
SetBool takes two arguments because it needs to know whether to set it false or true. So
myAnimator.SetBool("slide", true);
you could also:
myAnimator.SetBool("slide", false);
Your answer
![](https://koobas.hobune.stream/wayback/20220612071429im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Abstract and non abstract class 2 Answers
Error no animation attach to bear 0 Answers
I want to animate with SetTrigger? 0 Answers
The name animator does not exist in the current context... Help? 1 Answer