This rule is now disabled by default, see why here. if you still want to use it, you can add the following to your .editorconfig
file:
[*.cs]
dotnet_diagnostic.UNT0005.severity = suggestion
FixedUpdate is independent of the frame rate. Use Time.fixedDeltaTime instead of Time.deltaTime.
using UnityEngine;
class Camera : MonoBehaviour
{
public void FixedUpdate()
{
var foo = Time.deltaTime;
}
}
Use Time.fixedDeltaTime:
using UnityEngine;
class Camera : MonoBehaviour
{
public void FixedUpdate()
{
var foo = Time.fixedDeltaTime;
}
}
A code fix is offered for this diagnostic to automatically apply this change.