How does Unity save the "editor view" of the Scene View when you close?

If I reposition the scene view camera and close Unity, when I reopen Unity it remembers that I’ve changed the perspective of the scene view camera. That’s cool. But it’s also puzzling, there doesn’t appear to be any file that is changed. I’m wondering how Unity persists the setup of the Scene View?

For those who would like to be able to reset the position of the scene view camera, one way to do that is to close and reopen the Scene View.

This information is not stored into your project.

On Windows, Unity stores several data about the Editor inside your C:\Users\<username>\AppData folder.

What you are looking for is the file called LastLayout.dwlt in the following folder:

C:\Users\<username>\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts.

You can open this YAML file with a text editor.

For Unity-2021-3-LTS on Windows, the scene view camera’s property is saved at:

<unity project name>\UserSettings\Layouts\default-2021.dwlt

Some of the scene property:

m_Text: Scene
...
m_Position:
    m_Target: {x: 0, y: 0, z: 0}
    speed: 2
    m_Value: {x: 0, y: 0, z: 0}
...
  m_Rotation:
    m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
    speed: 2
    m_Value: {x: 0, y: 0, z: 0, w: 0}
...
  m_Size:
    m_Target: 16.958813
    speed: 2
    m_Value: 16.958813

m_Position is camera pivot. This is also the location where your new GameObject is placed. m_Size is distance from camera to camera pivot.

As @dlurner said, if you close and reopen the Scene View, the scene view camera is reset. The above values are reset to zero. I think Unity editor just destroys the previous Scene window, and then create a new one with default values.