- Home /
 
Add a dynamic float function to an onValueChanged Event (Slider)
I would like to add an Object to my slider Event, and, from that object, choose a script function that has a float parameter, but I would like it to be a dynamic float, . It should look like this: 
Because I load the AudioManager in another scene, i have to do it through the script (every time I load a new scene). I can't find on the web how to do this :( Could you please help me?
 
                 
                1.png 
                (5.9 kB) 
               
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by ranch000 · Jan 14, 2019 at 03:52 AM
      slider.onValueChanged.AddListener(OnValueChange);
      
      public void OnValueChange(float value)
      {   
        Debug.Log(value);
      }
 
              Your answer