Hello guys i made a little simple play button for my game but how would i convert it to be a restart script too?? Code (csharp): var normalTex : Texture2D; var grayTex : Texture2D; function OnMouseEnter(){ guiTexture.texture = grayTex; } function OnMouseExit(){ guiTexture.texture = normalTex; Application.LoadLevel("one"); } function OnMouseDown(){ Debug.Log("Clicked"); }
Couldnt you just simply reload the Level / Scene and if nothing was persistent, it would all be reset? Application.LoadLevel("yourScene");