Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Game lags or crashes if i looking at -Z in unity hdrp

Discussion in 'Editor & General Support' started by jurrejeve, Jan 7, 2023.

  1. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    the lag is 12 fps and its only if i looking in the -z direction with the camera
    i the editor is there less lag... if i add occlusion culling the editor crashes.
    i'm using hdrp and i have the physicalbased sky on realtime with an update period of 1


    i hope its fixed soon
     
    Last edited: Jan 7, 2023
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    For the performance: check the profiler
    It can be that there are costly shaders etc. Or is this also in a completely empty scène with just a camera.

    About the crash: check the logs to see when it crashes and why

    In general: which unity version?
     
  3. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    I use Unity 2021.3.6f1 for my game


    in the editor there is especially lag when I look in the 0 0 0 postition
     
    Last edited: Jan 8, 2023
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    And the other points?
     
  5. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    this is the profiler when i look around every 0,0,0 position


    profiler.png
     
  6. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    no lag if i look other directions
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    As I said, try an empty scene. You can clearly see that it is rendering different things. Add stuff from the lagging scene to the empty one one by one to find thr culprit
     
  8. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    but my game still needs a bit of optimization... when i don't look in 0 0 0 pos the fps is around 40-50fps
     
  9. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    there is no lag in an empty scene
     
  10. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    there was apparently a reflection probe in real time if I remove it then everything works fine again
     
    DevDunk likes this.
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,947
    Make a script to never allow the camera to go to 0,0,0 rotation, this can create a lot of issues and shadow errors that may affect performance as well.

    This is a known Unity unfixed issue since day one. i remember having issues with this for at least 8 years now.
     
  12. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    He already it was a realtime reflection probe.
    If you experience anything like this and you can confidently say it's an issue with 0,0,0 and not anything else in the scene, make a bug report
     
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,947
    Indeed, just noticed, though removing the probe is a temporary solution as may need it at some point for example.
     
  14. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    everything works fine now the camera was looking towards the refection probe and it was on 0 0 0 pos and it rendered when I looked into it but the fps is good again when I look righting 0 0 0 :)
     
    nasos_333 likes this.
  15. jurrejeve

    jurrejeve

    Joined:
    Apr 5, 2021
    Posts:
    15
    I didn't even know there was a reflection probe. :)