- Home /
Question is off-topic or not relevant.
To the moderator who published it: Read the forum rules again!
Edit Variable at Runtime
Hi guys, I dont know how do i change a variable in a script with a ui button.
the var is
var maxSpeed = 40.0;
and i think i need to create a new function what i need to select in the ui button function list, in this script which sets it to:
var maxSpeed = 70.0;
it must be a easy thing but i dont know. thanks for every help!
Do a quick search on google at least before you ask a question:
https://www.google.com/?gws_rd=ssl#safe=off&q=unity+how+to+change+a+variable+with+button
http://docs.unity3d.com/$$anonymous$$anual/script-Button.html
Follow this Question
Related Questions
how to modify this code to place it inside a car and move it along the car. 0 Answers
identifying the index of a gameobject in an array 1 Answer
Leaderboard thing ? 2 Answers
Issue with animation and gravity. 1 Answer
How to make my air plane to fly straight up (its local y-axis is parallel with global y-axis)? 0 Answers