Search Issue Tracker
By Design
Votes
0
Found in
2017.4.12f1
Issue ID
1084597
Regression
No
Time.captureFramerate is broken for values less than 90
Time.captureFramerate is returning incorrect values. The attached project contains the following test:
[Test]
public void CaptureFramerate_WhenSet_MakesDeltaTimeConstant([Values(1, 10, 30, 60, 90, 72)] int rate)
{
Time.captureFramerate = rate;
Assert.That(Time.deltaTime, Is.EqualTo(1f / rate).Within(0.01f));
}
And it is returning the following results;
For a value of 60
CaptureFramerate_WhenSet_MakesDeltaTimeConstant(60) (0.017s)
---
Expected: 0.0166666675f +/- 0.00999999978f
But was: 0.0333333351f
For a value of 30:
CaptureFramerate_WhenSet_MakesDeltaTimeConstant(30) (0.017s)
---
Expected: 0.0333333351f +/- 0.00999999978f
But was: 0.100000001f
10:
CaptureFramerate_WhenSet_MakesDeltaTimeConstant(10) (0.020s)
---
Expected: 0.100000001f +/- 0.00999999978f
But was: 1.0f
1:
CaptureFramerate_WhenSet_MakesDeltaTimeConstant(1) (0.035s)
---
Expected: 1.0f +/- 0.00999999978f
But was: 0.0166480541f
This case is similar to https://fogbugz.unity3d.com/f/cases/1084575/ but it appears to be broken in a different way (this was found when trying to find where care 1084575 broke)
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
hueda
Oct 19, 2018 06:26
ME TO!