Quantcast
Channel: Latest Questions by RedDevil
Viewing all articles
Browse latest Browse all 100

Unity 4.6 InputFields need help

$
0
0
Hi.So what i am trying to do is a test scene where i want to use the InputFields to change some variable values.Like most here I have not used these Inputfields before so I need help. After some research i found this code but i get errors that it cannot convert from string to float and i am not even sure it is a good code.Please help ty public InputField leftInput; void Awake() { leftInput.onSubmit.AddListener((value) => SubmitName(value)); leftInput.validation = InputField.Validation.Float; submitButton.onClick.AddListener(() => SubmitName(leftInput.value)); } void SubmitName(float value) { //change a value with the input oldvalue = value; }

Viewing all articles
Browse latest Browse all 100


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>