You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
436 B

  1. using System;
  2. using UnityEngine;
  3. using UnityStandardAssets.CrossPlatformInput;
  4. [RequireComponent(typeof (GUITexture))]
  5. public class ForcedReset : MonoBehaviour
  6. {
  7. private void Update()
  8. {
  9. // if we have forced a reset ...
  10. if (CrossPlatformInputManager.GetButtonDown("ResetObject"))
  11. {
  12. //... reload the scene
  13. Application.LoadLevelAsync(Application.loadedLevelName);
  14. }
  15. }
  16. }