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;
}
↧