Search Unity

Question Cyclical lag spikes in playmode and builds.

Discussion in 'Editor & General Support' started by oktaime1, Feb 14, 2024.

  1. oktaime1


    Nov 5, 2023
    Having consistent lag spikes in playmode and builds. on average 2-3 sec freezes or lags every 1-2 minutes.
    Got a scene with RigidBody based Character followed by 2 NPC. URP 2021 LTS.
    What i tried so far:
    Downsized big textures (from 2k up to 256); turned Shadows/Aliasing/HDR/ off; Camera clip plane to 500/

    Post Processing off; Got rid of Idle anim (just run and attack left); Rigidbody Interpolate/Ex; Vsync on/off; GPU skinning on/off, Reduced number of colliders to minimum only for 3 Rigidbodies.

    Swap Cinemachine(cinem. GUI took some ms in profiler) to simple follow main camera.

    last undesired option was to change timestep. nothing.

    Had to switch to 2022 and replace Rigidbodies with Char controller. Same lags again.
    below are some profiler snaps. Scene was stripped of all major objects/props. The latest is basically empty scene with just a plane and 1 char with animator attached to capsule character ctrler. Absolute minimum was just capsule with RB/Char ctrlr and move script. without Animator. No use.

    Attached Files: