- Home /
Question by
mremus · Mar 21, 2013 at 04:18 AM ·
load scenemouse movement
I have my splash page using GUITexture. Could someome help with a script that will load the next scene by just moving the mouse?
I am new to Unity and what I am looking for is a script that will act similar to what happens when your computer is in sleep mode and you move the mouse to wake it up. In this case in my sim the user is viewing the splash page and by moving the mouse causes the next scene to be loaded and played. Thanks ahead of time.
Comment
Best Answer
Answer by robertbu · Mar 21, 2013 at 04:39 AM
private var threshold = 0.1;
function Update() {
var v = Vector2(Input.GetAxis("Mouse Y"), Input.GetAxis("Mouse X"));
if (v.magnitude > threshold)
Application.LoadLevel("AnotherLevel");
}