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 Recorder and time scale

Discussion in 'Audio & Video' started by matrixvel, Sep 23, 2023.

  1. matrixvel

    matrixvel

    Joined:
    Nov 1, 2018
    Posts:
    10
    Hey all. When recording and the time scale is set during runtime everything pauses at the moment it's set as if the time scale was set to 0. This happens regardless of the value that time scale gets set to so even setting it to 1 pauses everything. It seems just the act of setting the value causes it. All works as intended in Play mode normally, this only occurs while recording. Any ideas? Could this be a limitation in Recorder?

    Thanks
     
  2. unity_7B7FCC2E6C8E17B17BAF

    unity_7B7FCC2E6C8E17B17BAF

    Unity Technologies

    Joined:
    Jul 6, 2022
    Posts:
    10
    Hello @matrixvel, when the recording starts, it sets the time scale to zero temporarily, and then it should restore the time scale to its previous value. This temporary setting of time scale to zero might be causing the pause you're experiencing for a few frames. Can you provide more details on how you are changing the time scale and when you start the recording? The order in which these actions occur can affect this behavior.
     
  3. matrixvel

    matrixvel

    Joined:
    Nov 1, 2018
    Posts:
    10
    @
    Hi, I actually don't change it right at the beginning. Also, just to clarify, the pause is indefinite. I have to stop the scene/recording when it happens. The timescale gets changed when something occurs (a goal being scored) and doesn't happen for at least 5-10 seconds after starting the scene/recording (I start them at the same time by just hitting record). When a goal is scored I call a method that sets the timescale to 0.5 and that's when it pauses. I call a coroutine right after to set it back to 1 after a certain amount of time but the coroutine never runs as everything acts as if it's set to 0. I thought maybe something was happening with the coroutine initially but removing the call to the coroutine has no effect.