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. Dismiss Notice

Question Mousing over the game while it's paused seems to make it "update"

Discussion in 'General Graphics' started by chemicalcrux, Mar 27, 2023.

  1. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    713
    I am working on some debug visuals. That involved calling Graphics.RenderMesh in LateUpdate to visualize a hitbox.

    I'm using Unity 2022.2.9 with the HDRP.

    I noticed that the mesh would randomly disappear after a little while. Notably, in the game view:
    1. I pause the game
    2. I advance the game by one frame
    3. The mesh appears
    4. I mouse over the game view
    5. The mesh disappears and motion blur visibly updates
    Does interacting with the game view during a pause make something...happen? Does it cause the rendering pipeline to get executed again? Can I do anything to make sure that the mesh drawn by RenderMesh doesn't vanish?

    I also noticed that clicking while the game is paused makes the graphics jitter a tiny bit, like something is refreshing on every interaction.
     
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    638
    Perhaps its as simple as the difference between Time.deltaTime and Time.unscaledTime;