How can I have a text already written on a text field at the very start of the game?
Like, when I start the scene, there will already be text written on the text field, but the player can still edit it if they wish to do so.
Here is the code I’m using for the text field:
void OnGUI() {
Rect r = new Rect(Screen.width/15,Screen.height/3.5f,width,height);
GUILayout.BeginArea(r, new GUIStyle("box"));
text = GUILayout.TextField(text, layout);
}
Thanks!