Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

how to make a script that goes to the next scene if you click a gameobject in unity 5

$
0
0
in the old unity i learned from a tutorial how to make a script to do that but now in unit 5 it doesn't work. can someone help me with changing the code so that it works. on this link is the tutorial [youtube link][1] and this is the code line in java hope someone can help me greetings danny var levelToLoad : int; var soundhover : AudioClip; var beep : AudioClip; var QuitButton=false; function OnMouseEnter(){ GetComponent.().PlayOneShot(soundhover); } function OnMouseUp(){ GetComponent.().PlayOneShot(beep); yield new WaitForSeconds(0.35); if(QuitButton){ Application.Quit(); } else{ Application.LoadLevel(levelToLoad); } } @script RequireComponent(AudioSource) [1]: https://www.youtube.com/watch?v=Z8YGKQvEz1Y

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>