problem with Slider event inspector

I’m having an issue with the Slider component. I put a Slider in the scene and then wrote this code to link to it:

public void TestValue(float value) {
    Debug.Log("TEST " + value);
}

but when I then link to this function in the Slider’s value-changed event, it asks for a fixed value instead of passing in dynamic values (ie. what it shows in the attached screenshot).

This other thread does indicate one workaround, but the Manual indicates that it should work in the Inspector (look at the bottom). This worked correctly in Unity 5.1, so I’m assuming this changed sometime before 5.4, where I’m trying right now. Is there something I need to do to get this working, or is this a bug?

2906250--214094--Screen Shot 2017-01-03 at 12.06.13 PM.png

Your code is ok, but in Slider inspector you should link TestValue from “Dynamic float” not TestValue from “Static Parameters” (on top of list of object functions).

1 Like

ah right I forgot they are separate sections of the dropdown, thanks