Skip to content

Instantly share code, notes, and snippets.

@ppolsinelli
Created August 26, 2018 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppolsinelli/d5dfcc216a17a50201230e6af4b4731f to your computer and use it in GitHub Desktop.
Save ppolsinelli/d5dfcc216a17a50201230e6af4b4731f to your computer and use it in GitHub Desktop.
Speed up your game for debug
public void Update()
{
if (!Production && Time.time - lastTimeUpdatedTimeSpeeder > 1)
{
lastTimeUpdatedTimeSpeeder = Time.time;
if (Input.GetKey("f"))
{
Time.timeScale = 4f;
DOTween.timeScale = 4f;
Delogger.Log("Time.timeScale", Time.timeScale);
}
else
{
Time.timeScale = 1;
DOTween.timeScale = 1;
}
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment