InputField (TMP)

I’m a beginner, so please explain in a clear way :slight_smile: Thanks!

How to read a float value in an TMP_InputField?
Thanks for replies

Read the text as string, then parse the string using float.TryParse

I tried it but got an error:

|Error|CS1061|‘GameObject’ does not contain a definition for ‘text’ and no accessible extension method ‘text’ accepting a first argument of type ‘GameObject’ could be found (are you missing a using directive or an assembly reference?

mass = float.TryParse(MassSettings.text);