文档

Unity Engine

Unity Engine

scenes

The Scenes to be included in the build.
阅读时间1 分钟最后更新于 1 天前

Definition

public string[] scenes { readonly get; set; }

Remarks

If empty, the currently open Scene will be built. Paths are relative to the project folder, for example "Assets/MyLevels/MyScene.unity". If any scene is currently open and has unsaved changes, the editor will ask the user to save these changes before building - or save changes automatically, if Application.isBatchMode is true. Additional Resources: EditorBuildSettings.scenes.