- Home /
linking the new GUI slider to transform of a game object?
Hello all,
Hopefully someone can help me out with this.
In the new GUI system for 4.6, how do i make a game object move in y direction and have it link to the value of a slider? For instance if i have a slider with a max value of 1000, and i want a sphere to move in its local y position by the value of that slider how would i do it? I looked at the On Value Changed list of the slider itself, but couldn't see a way to do it. Am i missing something very simple? Or do i need to write a script to do it? Any help is greatly appreciated!
PAul
Answer by HarshadK · Sep 03, 2014 at 10:58 AM
You can't just set the y transform directly from the list of functions available for On Value Changed for your game object.
You have to do it via your own script itself.
Your answer
![](https://koobas.hobune.stream/wayback/20220613162210im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can i detect changes on a GUI slider? 1 Answer
How to make a Horizontal Slider slide between resolutions? 3 Answers
Bullet Prefab not instantiating 1 Answer
Enable/Disable Game Object With GUI Button 1 Answer
Horizontal Slider issue 0 Answers