With Immediate Mode, we have to store the values of interactive controls like buttons and text inputs at the time we display them. Also, we need to decide if, and when, to persistently store values to be remembered when the panel is out of focus or closed.
In this recipe, we display a text label saying hello to the player and using their name if it has been found in the EditorPrefs storage. We also offer a text input and a button and, when the button is clicked, we update the name being greeted:
![](https://static.packt-cdn.com/products/9781788471909/graphics/assets/510a539f-d625-4cec-a4f9-c8aa242d7a97.png)