SceneReloader.cs 295 B

1234567891011121314
  1. using UnityEngine;
  2. using UnityEngine.SceneManagement;
  3. namespace Tools
  4. {
  5. public class SceneReloader : MonoBehaviour
  6. {
  7. private void Update()
  8. {
  9. if (Input.GetKeyDown(KeyCode.R)) SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
  10. }
  11. }
  12. }