Skip to content

Instantly share code, notes, and snippets.

@kalineh
Created October 31, 2017 07:22
Show Gist options
  • Save kalineh/cea40f340dda18d6e121830fbe25fe6a to your computer and use it in GitHub Desktop.
Save kalineh/cea40f340dda18d6e121830fbe25fe6a to your computer and use it in GitHub Desktop.
EditorTimeScale.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class EditorTimeScale
: EditorWindow
{
[MenuItem("Tools/TimeScale &T")]
public static void TimeScale()
{
var window = GetWindow<EditorTimeScale>();
}
public void OnGUI()
{
Time.timeScale = EditorGUILayout.Slider("Time Scale", Time.timeScale, 0.0f, 2.0f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment