Search Unity

Bug Step and build physics world generating a TON of garbage

Discussion in 'Physics for ECS' started by aveakrause, Jul 25, 2020.

  1. aveakrause

    aveakrause

    Joined:
    Oct 3, 2018
    Posts:
    70
    Hardly anything in the scene. Nothing in the scene is moving.


    This only gets exaggerated as things start moving and engaging with physics. But this is at complete rest. I'm not sure what Dispose Sentinel does, but its being used a lot, and generating a crap ton of garbage which causes big lag spikes.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Dispose sentinel is part of the safety system which is stripped out in builds. There is little point to profiling memory in editor, do it in a build.
     
  3. aveakrause

    aveakrause

    Joined:
    Oct 3, 2018
    Posts:
    70
    I haven't been able to get it to build successfully. Subscenes seem to break everything for builds.
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    This is not well documented but subscenes can't be built using the old build pipeline. They need to be built use the new SBP (and platforms)

    https://docs.unity3d.com/Packages/com.unity.scriptablebuildpipeline@1.6/manual/index.html
    https://docs.unity3d.com/Packages/com.unity.platforms@0.6/manual/index.html
    https://docs.unity3d.com/Packages/com.unity.platforms.windows@0.6/manual/index.html
     
  5. petarmHavok

    petarmHavok

    Joined:
    Nov 20, 2018
    Posts:
    461
    Also, although @tertle is correct and profiling the build, you can get better results in the editor if you disable safety checks, jobs debugger and leak detection.
     
    Lukas_Kastern likes this.