Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

DynamicVariable not showing in slider UI object...

Discussion in 'Scripting' started by IamKevinRichardson, Sep 17, 2019.

  1. IamKevinRichardson

    IamKevinRichardson

    Joined:
    Feb 5, 2014
    Posts:
    52
    Hello!

    I am trying to control volume with a slider.

    My function is:

    Code (CSharp):
    1.     public void SetVolume(float volume)
    2.     {
    3.         Debug.Log(volume);
    4.     }
    5.  
    I add the script to an empty game object I call Settings Menu Controller.

    I go down to the On Value Changed () part section of the inspector of the Slider game object.

    I add the Settings Menu Controller gameObject here.

    Under the drop down menu, the function shows but the dynamic float does not...

    Below is a screenshot...
    Screenshot.jpg
    What am I doing wrong...
     
    dog_funtom likes this.
  2. IamKevinRichardson

    IamKevinRichardson

    Joined:
    Feb 5, 2014
    Posts:
    52
    dog_funtom likes this.