I am looking for a way that I can restart the game with pressing the letter R without closing out of the application in standalone. I only have 1 scene and I have NO Experience. Please help me:D
using UnityEngine.SceneManagement;
SceneManager.LoadScene( SceneManager.GetActiveScene().name );
@doublemax where do you put this line on code?
using UnityEngine;
public class Restart : MonoBehaviour
{
void Start()
{
}
void Update()
{
if (Input.GetKeyDown(KeyCode.R))
{
Application.LoadLevel(0);
}
}
}
Try this!
@doublemax can I ask why this changes the games lighting?