For my project, the default values are calculated on the external output, these values can be changed using the input fields in the new Unity user interface. If the values do not change, a gray placeholder should appear after the calculation. I really can't figure out how to change the placeholder text to a script without even finding a solution anywhere. I tried this:
gameObject.GetComponent<InputField>().placeholder = uv.value;
The script is attached to this game object in the input field. However, to get the written value in the input field, I use this line of code:
uv.value = gameObject.GetComponent<InputField>().text;
It works great. Did I miss something? Some help would be appreciated to write here, this is my last resort. Thanks you!
source
share