- Home /
SendMessage on GUI Text
I have a text field at the main menu saying player name. And a GUI Text label on top of my player saying "...............". And now I want to know a way like send message that you put the name in the text field and that name will appear during gameplay. Heres some more details: Text field is in scene0 and the player with the 3D Text is in scene1.
Felipe
Answer by Berenger · May 26, 2012 at 02:59 AM
I think you're a bit confused between the component GUIText and functions from UnityGUI such as GUI.Label or GUI.TextField.
Anyway, message can't be sent through scene as only the one loaded exist. You can use, however, a static var or a game object with DontDestroyOnLoad to retrieve the data once the level is loaded.
Your answer
![](https://koobas.hobune.stream/wayback/20220613071947im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Set name for game 0 Answers
uGUI text field iOS 0 Answers
TextField on Android clears the text when user tap outside the keyboard 1 Answer
Saving custom text 0 Answers
update 3d text through script 2 Answers