Search Unity

Question Physics Simulation Mode changes in play mode (but not in build)

Discussion in 'Physics' started by andersTheNinja, Nov 10, 2023.

  1. andersTheNinja

    andersTheNinja

    Joined:
    May 17, 2018
    Posts:
    18
    Hi folks, like the title. weirdo thing, don't know if I've accidentally changed a setting somewhere or something.
    Things used to work as expected in a small test project of mine. Enter playmode, I can control my little space ship which is moved with forces.
    Suddenly, when I enter play mode nothing happens. After much scratching of my head I check Project settings -> physics -> Simulation mode, and it is set to 'Fixed update'. Enter play mode, and the setting changes to 'Script'. How can this happen? When I build the project, everything works as expected with physics running in fixed update.
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,928
    My first guess would be that some editor script is setting Physics.simulationMode.

    Have you imported any third-party assets/utils?
     
  3. andersTheNinja

    andersTheNinja

    Joined:
    May 17, 2018
    Posts:
    18
    Only official Unity ones so far. I'm trying to get a grip on ECS physics, is there any situation when ECS would change the setting?