- Home /
Opening a scene with a button
I need help opening a scene (that I have already created) when I click a button.
Comment
Best Answer
Answer by Dreamer · Jun 09, 2011 at 01:39 AM
function OnGUI() {
if (GUI.Button(Rect(10,10,50,50),"Load Scene"))
Application.LoadLevel(name_level);
}
(replace name_level with your own level name)
Your answer
![](https://koobas.hobune.stream/wayback/20220612101724im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to open individual prefab doors 1 Answer
Why are my scripts not opening anymore? 0 Answers
gameObject with two Transforms crashing the editor glitch! 1 Answer
Door Script compiler error 0 Answers
Script for door opening and closing 2 Answers