smart-interactive-display/Assets/Plugins/IngameDebugConsole/Scripts/Commands/TimeCommands.cs

21 lines
517 B
C#
Raw Normal View History

2024-05-24 01:16:15 -07:00
#if IDG_ENABLE_HELPER_COMMANDS
using UnityEngine;
namespace IngameDebugConsole.Commands
{
public class TimeCommands
{
[ConsoleMethod( "time.scale", "Sets the Time.timeScale value" ), UnityEngine.Scripting.Preserve]
public static void SetTimeScale( float value )
{
Time.timeScale = Mathf.Max( value, 0f );
}
[ConsoleMethod( "time.scale", "Returns the current Time.timeScale value" ), UnityEngine.Scripting.Preserve]
public static float GetTimeScale()
{
return Time.timeScale;
}
}
}
#endif