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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Showcase #tips_cmd time scale control command

Discussion in 'ML-Agents' started by Sab_Rango, May 3, 2021.

  1. Sab_Rango


    Aug 30, 2019
    Hello !
    After a feedback from the developers, I finally found the python cmd to control time-scale in the editor .

    " --time-scale=1 --capture-frame-rate=0 "

    So after adding this command

    [mlagents-learn saymyconfig.yaml --time-scale=1 --capture-frame-rate=0 --run-id=saymyid01]

    the editor time scale sets into 1.
    Then the models will be trained in the same time scale that the usual built models run in the play mode.

    If only cmd " --time-scale=1" was called, the editor time scale sets into 1.
    But realistically float Time.deltatime will stay about 3x time scale.
  2. celion_unity


    Unity Technologies

    Jun 12, 2019
    I was looking into this the other day. ML-Agents is doing what it says it's doing (it sets
    to the value passed for
    ). But there are more complicated interactions between the other Time settings, which are not specific to ML-Agents.

    As you noted, setting
    --time-scale=1 --capture-frame-rate=0
    should keep Time.deltaTime and Time.unscaledDeltaTime equal.

    If you want ML-Agents to leave all the Time values as their default, you should also pass
    Sab_Rango likes this.