Search Unity

What "project file" stores the currently open scene (MAC)?

Discussion in 'Getting Started' started by tigger, Sep 28, 2019.

  1. tigger

    tigger

    Joined:
    Jan 8, 2013
    Posts:
    95
    When you open a scene, save the project, close Unity, and reopen Unity and the project, the scene that was open in the last "session" is now open in the new session. In what file is that information (currently open scene) saved?
    Thank you.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Not sure, but you can use your version control system to figure it out. For example, I use trusty SVN so I'd just open a project, open a different scene, click save project, then run command "svn status". Whatever file that has been modified is the one you're looking for.
     
  3. tigger

    tigger

    Joined:
    Jan 8, 2013
    Posts:
    95
    Hi. Thank you for the suggestion but that's sort of how/why the question came up. Whatever file it is that's changing isn't being tracked by GIT. Probably something in the ignore file that shouldn't be there.
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    It's because the last opened scene isn't tracked by the project itself but by the editor and stored in its own settings file which for macOS is ~/Library/Preferences/com.unity3d.UnityEditor5.x.plist. It's done this way because multiple people working on the same project won't be working on the same scene at the same time.

    https://docs.unity3d.com/ScriptReference/EditorPrefs.html
     
    Joe-Censored and tigger like this.
  5. tigger

    tigger

    Joined:
    Jan 8, 2013
    Posts:
    95
    That's what I was looking for. Makes sense. Thank you.