- Home /
Question by
Der_Kevin · Dec 08, 2016 at 12:21 PM ·
functionsliderparameters
Change functions parameter with UI- slider?
hey! so i have this function:
public void BendTail(float bendValue) {
bendValue = bendValue * -1f;
Bend (tailBend1, tailBend2, bendValue);
}
and i want to change the "float bendValue" with a simple ui slider (public Slider TailSlider;). so i thought i would work something like this:
void Update() {
BendTail(bendValue) = TailSlider.value;
}
but this seams to be wrong - how can i do this the right way?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612102309im_/https://answers.unity.com/themes/thub/images/avi.jpg)