Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance
#8
(15-07-2020, 03:39 PM)anulagarwal Wrote: But how do i fix this for Obi?
Currently I am not using any additional scripts, so can i fix the timestep?

Timestep length is a global setting in Unity, it affects all physics going on in your game.

I get the feeling that the fact the blue part of the profiler graph is named "scripts" is confusing you: everything in Unity that's not built-in in the engine will show up in the profiler as "scripts", this includes Obi, as well as any other stuff running in the CPU. Having additional scripts or not has no relevance in this case, as the issue is clearly timestep related: the wall-clock time it takes for Obi to simulate one timestep is larger than the game time simulated by the step, so Unity is forced to take multiple physics steps per frame to compensate for this, until it hits the max timestep value.

Increasing the timestep length or reducing the maximum timestep time would fix the issue, as I suggested. Ideally, you could also tweak the simulation parameters and/or use less particles to make each step less costly.
Reply


Messages In This Thread
Performance - by anulagarwal - 15-07-2020, 12:02 PM
RE: Performance - by josemendez - 15-07-2020, 12:37 PM
RE: Performance - by anulagarwal - 15-07-2020, 12:40 PM
RE: Performance - by josemendez - 15-07-2020, 12:43 PM
RE: Performance - by anulagarwal - 15-07-2020, 03:22 PM
RE: Performance - by josemendez - 15-07-2020, 03:31 PM
RE: Performance - by anulagarwal - 15-07-2020, 03:39 PM
RE: Performance - by josemendez - 15-07-2020, 03:43 PM
RE: Performance - by josemendez - 15-07-2020, 03:51 PM