- Home /
Question by
durandcreations · Jul 08, 2014 at 02:29 PM ·
simplebasiceasy
script to use the enter key to switch to the next scene
what is an extremely simple script to switch to the next scene using the enter key? all i want is to create a scene specifically for a cut scene that can be skipped by clicking the enter button. scene starts, animation plays, if the person wants to skip they can at any time, next scene loads.
Comment
Best Answer
Answer by jamesflowerdew · Jul 08, 2014 at 02:32 PM
public string pLevel;
void Update(){
if(Input.GetKey(KeyCode.enter)){
Application.LoadLevel(pLevel);
}
}
Please make sure you use the helpfully labelled 'comment' boxes to respond to answers, rather than making a new answer.