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

Exiting Play Mode always results in scene claiming it has unsaved changes

Discussion in 'Editor & General Support' started by dgoyette, Jan 9, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,117
    This is pretty annoying, and I'd like to track down what's causing it. If I save my scene, so that it has no unsaved changes, then enter Play Mode, exiting Play Mode will result in Unity showing an * next to my scene, and believing it has unsaved changes. However, if I save again and look at Version Control, it shows no changes to the scene. So, exiting play mode keeps marking my scenes as dirty, but without having any actual changes.

    I don't know what is causing this, and I don't see any way to track it down. Is there some way to figure out what objects are "dirty" in the scene, so I can isolate and hopefully correct this?
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,904
    It does not happen in my 2018.3f2, maybe something retains some change in the scene? Something which can be edited in play mode and remains edited? (Just guessing)
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,117
    I tracked it down to apparently being an issue with Cinemachine. Having a CinemachineBrain component in the scene causes this behavior. I'll submit a bug report. I just wish there had been an easier way than trial-and-error to figure out what was causing this.
     
    Lurking-Ninja likes this.
  4. matrixvel

    matrixvel

    Joined:
    Nov 1, 2018
    Posts:
    10
    Hi dgoyette, did you ever submit a bug report or get an update on this? Having the same issue when a CinemachineBrain is attached to the main camera and is resolved when it's removed. Drives me nuts!
     
  5. matrixvel

    matrixvel

    Joined:
    Nov 1, 2018
    Posts:
    10
    I actually tracked it further to the "Save during play" option on the cinemachine virtual cam which I guess makes some kind of sense although the scene gets marked dirty regardless if any of the cam settings were changed or not. Anyways if it helps anyone, unchecking that option solves the issue for me.
     
  6. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,117
    Yup, that's what corrected this for me as well.