- Unity 2020 By Example
- Robert Wells
- 347字
- 2025-02-28 16:26:40
Saving the scene
Overall, the scene is looking good and is worth saving to disk so that we don't lose it. To save the scene, perform either of the following steps:
- Choose File | Save Scene from the application menu.
- Alternatively, press Ctrl + S on the keyboard or else.
If you're saving the scene for the first time, Unity displays a pop-up save dialog, prompting you to name the scene (I called it Level_01 and saved it in the Scenes folder). After saving the scene, it becomes an asset of the project and appears in the Project panel. This means that the scene is now a genuine and integral part of the project and not just a temporary work in progress as it was before. Notice also that saving a scene is conceptually different from saving a project. For example, the application menu has entries for Save Scene and Save Project. Remember, a project is a collection of files and folders, including assets and scenes. A scene, by contrast, is one asset within the project and represents a complete 3D map that may be populated by other assets, such as meshes, textures, and sounds. Thus, saving a project saves the configuration between files and assets, including scenes. Saving a scene, in contrast, just retains the level changes within that specified scene:

Figure 1.48 – Saved scenes are added as assets within your project
Tip
You can see in Figure 1.48 that I've saved my scene in the Scenes folder. If you want to save it somewhere else, folders can be created in your project by right-clicking on any empty area in the Project panel and choosing New Folder from the context menu, or else choose Assets | Create | Folder from the application menu. You can easily move and rearrange assets among folders by simply dragging and dropping them. And that's it! The scene is saved to a file at the location you specified. As we progress through the book, make sure you regularly save your scenes to ensure that you do not lose any progress.