Recently I have been making my own GUI module in python, and I have been modelling it after the one used in Unity. I just love the way everything is put together in Unity!
So I have gotten to the stage where I have to pass 2 values into my text field function, in order to save both the text and weather or not the field is active, but Unity seems to do this automatically???
How does it work?
How does Unity keep track of which text field is active, when I can add any text field anywhere at any time...
If backend questions arn't supposed to be here, please just tell me and I'll delete the question :)
Thank you, Benproductions1
Ps: I'm not looking for code, just an explanation of how the Unity GUI text field works in the backend :)
EDIT:
Let me clear this up a little bit.
I am asking, how unity manages to do text fields by only supplying the text and not an `active` value
AKA: Why is it `text = GUILayout.TextField(text);` and not `text = GUILayout.TextField(text, ref active);`
Thankn you
↧