1.3.3: Getting close to 1.0 in time scale will set it to 1.0
This commit is contained in:
parent
40fa4d7151
commit
0b147a9144
|
|
@ -26,6 +26,9 @@ namespace Module.NavigationTool.Editor.Toolbar
|
||||||
float temp = GUI.HorizontalSlider(r1, value, ToolbarSettings.TimeScaleMinValue, ToolbarSettings.TimeScaleMaxValue);
|
float temp = GUI.HorizontalSlider(r1, value, ToolbarSettings.TimeScaleMinValue, ToolbarSettings.TimeScaleMaxValue);
|
||||||
temp = Mathf.Clamp(temp, ToolbarSettings.TimeScaleMinValue, ToolbarSettings.TimeScaleMaxValue);
|
temp = Mathf.Clamp(temp, ToolbarSettings.TimeScaleMinValue, ToolbarSettings.TimeScaleMaxValue);
|
||||||
|
|
||||||
|
if (Mathf.Abs(temp - 1.0f) < 0.02f)
|
||||||
|
temp = 1.0f;
|
||||||
|
|
||||||
if (!Mathf.Approximately(value, temp))
|
if (!Mathf.Approximately(value, temp))
|
||||||
Time.timeScale = temp;
|
Time.timeScale = temp;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "com.module.navigationtool",
|
"name": "com.module.navigationtool",
|
||||||
"version": "1.3.2",
|
"version": "1.3.3",
|
||||||
"displayName": "Module.NavigationTool",
|
"displayName": "Module.NavigationTool",
|
||||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||||
"unity": "2019.2",
|
"unity": "2019.2",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue