Setting Fixed Timestep (Project Settings) by script?

Hi,

I wonder if the “Fixed Timestep” value in the Project Settings section (Edit => Project Settings => Time) can be altered by script? I would like to change this value so it fits the currents (mobile) device hardware capabilities.

Thanks!

Regards, Axel

2 Likes
// Sets to 20 fps
Time.fixedDeltaTime = 0.05f;
13 Likes

THANKS!!

3 Likes

On a related note, any way to change the “Maximum Allowed Timestep” value by script at runtime?

In answer to my own question, “Time.maximumDeltaTime”.

3 Likes

Do you know if this changes the maximum allowed timestep globally (for every scripts) or locally (for the script it’s mentioned in)?

Time is a global static class, as you can see from the online documentation for it.

1 Like