How to Script a Title Screen in Unity?

I want to script my game logo, and at the title screen I want to put on “Press Any Button To Begin”. For the title screen this is what I want to put: Logo, Press Any Button to Begin, and some 2D clouds in the background.

Then after that, I want to know how to script this thing where you can Load File or start a New File.

Then there will be the Game Modes at the menu :P. How do script them?

Have you looked at the documentation for [Unity's GUI class][1]? The Input class will help you detect button presses. [1]: http://docs.unity3d.com/Documentation/Components/GUIScriptingGuide.html

1 Answer

1

JS-

// Detects if any key has been pressed down.
    function Update() {
        if(Input.anyKeyDown)
            Debug.Log("A key or mouse click has been detected");
    }

C#

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    void Update() {
        if (Input.anyKeyDown)
            Debug.Log("A key or mouse click has been detected");
        
    }
}

Save and load
http://wiki.unity3d.com/index.php/Save_and_Load_from_XML