- Home /
Question by
Ipwndthebeast · Jan 29, 2014 at 03:43 PM ·
respawnwhats-wrong
Whats Wrong with my code?
function Start ()
{
function OnGUI();
{
if(GUI.Button(Rect(10,10,50,50),"dlksfja"))
{
Application.LoadLevel(Application.loadedLevel);
}
}
}
Comment
Answer by Ashish Dwivedi · Jan 29, 2014 at 03:48 PM
You wrote one method inside another. You cann't do like this.
function Start ()
{
}
function OnGUI()
{
if(GUI.Button(Rect(10,10,50,50),"dlksfja"))
{
Application.LoadLevel(Application.loadedLevel);
}
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How do I make a respawn system? 1 Answer
With my respawn script, Player can't move for about 5 seconds. 0 Answers
qrest system 1 Answer
C# Unity 3D Lock Rotation but allow Rotation of Parent Object 1 Answer