Your account has been flagged due to frequent spamming, you are not permitted to post comments. Contact email@example.com.
How can I get a decimal number in text field?
over 7 years agoAnswer it
over 6 years ago
InputAmount = System.Single.Parse(GameObject.FindGameObjectsWithTag("Amount").GetComponent().text);
Note that the FindGameObjectsWithTag method is expensive and if you are calling this more than once, you should cache the GameObject at start up and use it.
over 7 years ago
First Get a sub string from the text field string(from decimal to end of the string). Then parse it in any datatype you want.