Search Unity

Stepping physics world is taking too long

Discussion in 'DOTS Physics' started by Deleted User, Aug 16, 2019.

  1. Deleted User

    Deleted User

    Guest

    Here is a screenshot of profiler:
    Annotation 2019-08-16 151606.png

    upload_2019-8-16_15-12-57.png


    Having one moving capsule and a static plane in the scene makes the physics world take this long (game runs at 30FPS). is this normal?
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,037
    Physic system runs pretty poorly in editor so you should only judge it in a build. That said I definitely get better than 30fps with just that.
     
  3. Deleted User

    Deleted User

    Guest

    What's the deal with these allocations and GC calls? I see in profiler that GC.Collect takes 40-70 ms of time.
     
  4. Deleted User

    Deleted User

    Guest

    I made a standalone build and it's infinitely faster. Running 300-500 FPS. (The whole thing takes less than 2ms).
     
  5. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,037
    Do you have stack trace on?
     
    Deleted User likes this.
  6. Deleted User

    Deleted User

    Guest

    Thank you. I didn't notice I turned the stacktrace on.
    Turning it off removed (almost) all GC allocations.
     
unityunity