Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Unity physics work even i delete physic step GO from editor.

Discussion in 'Physics for ECS' started by seojihyuk, Jun 26, 2022.

  1. seojihyuk


    Sep 19, 2014
    Hello, guys.
    I've recently upgraded my project to Unity Physics package 0.50. after i converted, I've got huge performance drop (From 60 FPS to 20 FPS) and I found that inside FixedStepSimulationSystemGroup All system run multiple time in 1 frame moveover Even I deleted physics step GO which is converted to entity from scene, the unity physics is working.
    My entities related to physics are about 500s.
    Why is it happeing? Can you explain some reason that make BuildPhysicsWorldSystem work 5 times a frame?
  2. WildMaN


    Jan 24, 2013
    If you upgraded from pre-0.5, i.e. you didn't have FixedStep before, then what you see is by design. If an actual physics step takes longer than a defined FixedStep duration then it chokes on and FPS crashes.

    If you don't need fixed updates then simply
    World.DefaultGameObjectInjectionWorld.GetOrCreateSystem<FixedStepSimulationSystemGroup>().FixedRateManager = null;

    Otherwise, I'd like to know the solution myself - how to cap the maximum rate but not the minimum, so spikes do not cause the missed updates to pile up.