*
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections;
|
||||
|
||||
|
||||
public class TimeControl : EditorWindow {
|
||||
|
||||
[MenuItem ("L/TimeControl")]
|
||||
public static void ShowTimeControl(){
|
||||
TimeControl window = (TimeControl)EditorWindow.GetWindow (typeof (TimeControl));
|
||||
window.titleContent = new GUIContent("Time control");
|
||||
|
||||
}
|
||||
|
||||
|
||||
void OnGUI () {
|
||||
|
||||
|
||||
Time.timeScale = EditorGUILayout.Slider ("Time scale", Time.timeScale, 0.0f, 2.0f);
|
||||
Time.fixedDeltaTime = EditorGUILayout.FloatField ("Fixed time step", Time.fixedDeltaTime);
|
||||
if (GUILayout.Button ("Reset")) {
|
||||
Time.timeScale = 1.0f;
|
||||
Time.fixedDeltaTime = 0.02f;
|
||||
}
|
||||
/*GUILayout.Label ("Base Settings", EditorStyles.boldLabel);
|
||||
myString = EditorGUILayout.TextField ("Text Field", myString);
|
||||
|
||||
groupEnabled = EditorGUILayout.BeginToggleGroup ("Optional Settings", groupEnabled);
|
||||
myBool = EditorGUILayout.Toggle ("Toggle", myBool);*/
|
||||
|
||||
//EditorGUILayout.EndToggleGroup ();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5aa2b0feb687fae4a84fad23ad45cb6a
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
Reference in New Issue
Block a user