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?
// 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");
}
}
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
– cmpgk1024