How to save a multpile choice?

Im going to make this simple.

I've made a multiple choice button here it is :

-Function Update () {
print ("Hello")
-Function OnGUI()
if (GUI.Button(Rect(20,40,100,40),'Hello')) {
    var answer1=print ("How are you?");


-Function OnGUI()
if (GUI.Button(Rect(20,60,100,40),'sorry I haven't got time')) {
    var answer1=print ("ok, bye.");


Ok before any comment shows up, I'm aware that my script is wrong. (and if someone can correct it, I thank him for that, it'll be of great help)

But that is not what I want know.

I just want to know how is it possible to save this "function" or choice?

I mean I want to make a rewind button, in the game, that will allow player to come back to another choice option he already made.

Like a save game.

I'm taking this idea from this game:

Try it, and try the rewind button you'll understand what I mean.

I want to know how I can save this multiple choice as per exemple "choice 1" and get back to it if i choose in the game to rewind to choice 1.


Actually the script is wrong, do not know if the logic, but look at the: rendrer, the renderer would be correct.

You can use PlayerPrefs to record a variable the value of something, look in your manual offline. Go to Help Menu in Unity > Unity Manual, Scripting and choose Scripting and type PlayerPrefs but also look at the videos of Zerg Burg Arcade:

  1. Unity3D Tutorial - PlayerPrefs 1 / x
  2. Unity3D Tutorial - PlayerPrefs 2 / x
  3. Unity3D Tutorial - PlayerPrefs 3 / x
  4. Unity3D Tutorial - PlayerPrefs 4 / x
  5. Unity3D Tutorial - PlayerPrefs 5 / x
  6. Unity3D Tutorial - PlayerPrefs 6 / x

Link to site: