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)
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
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
hueda
Oct 19, 2018 06:26
ME TO!