Skip to content

Instantly share code, notes, and snippets.

@JT5D
Forked from unitycoder/OneLinePause.cs
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save JT5D/ee573b3e9b5f66a2400d to your computer and use it in GitHub Desktop.

Select an option

Save JT5D/ee573b3e9b5f66a2400d to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class PauseMode : MonoBehaviour
{
void Update ()
{
if (Input.GetKeyDown ("p")) Time.timeScale = 1-Time.timeScale;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment