Saving a variable through loads

I wan't to save a variable through loads, but I'm not too sure how to tackle this. If I have, for example, a string, such as the player's name, how can I have it survive the load so I can use it in a second level?

I saw that `GameObject.DontDestroyOnLoad()` can keep a game object for the next level, but what if I have a string for the player to enter their name, as the following shows:

var NAME = "";
function OnGUI() {
    NAME = GUI.TextField(Rect(10, 10, 80, 25), NAME, 10);

How could I add it to a GameObject, or modify it so that I can have it for the next load?

PlayerPrefs should do the trick.