This class allows you to modify the Editor Build Settings via script.
See EditorBuildSettings.scenes for an example of how to use this class. Additional resources: EditorBuildSettingsScene, EditorUserBuildSettings, BuildPlayerOptions.
| Property | Description |
|---|---|
| globalScenes | The list of scenes used by all platform profiles and build profiles that do not override global scenes. |
| scenes | The list of scenes in the active platform profile or build profile to be included in the build. |
| UseParallelAssetBundleBuilding | Enables multi-process AssetBundle building. Additional resources: BuildPipeline.BuildAssetBundles |
| Method | Description |
|---|---|
| AddConfigObject | Store a reference to a config object by name. The object must be an asset in the project, otherwise it will not be saved when the editor is restarted or scripts are reloaded. To avoid name conflicts with other packages, it is recommended that names are qualified by a namespace, i.e. "company.package.name". |
| GetConfigObjectNames | Return a string array containing the names of all stored config object references. |
| RemoveConfigObject | Remove a config object reference by name. |
| TryGetConfigObject | Retrieve a config object reference by name. |
| Event | Description |
|---|---|
| sceneListChanged | A delegate called whenever EditorBuildSettings.scenes is set. |
| Property | Description |
|---|---|
| hideFlags | Controls whether the object is hidden, saved with the scene, and editable by the user. |
| name | The name of the object. |
| Method | Description |
|---|---|
| GetHashCode | Returns the hash code for the object. |
| GetInstanceID | Gets the instance ID of the object. |
| ToString | Returns the name of the object. |
| Method | Description |
|---|---|
| Destroy | Removes a GameObject, component, or asset. |
| DestroyImmediate | Destroys the specified object immediately. Use with caution and in Edit mode only. |
| DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
| FindAnyObjectByType | Retrieves any active loaded object of Type T. |
| FindFirstObjectByType | Retrieves the first active loaded object of Type type. |
| FindObjectsByType | Retrieves a list of all loaded objects of Type type and sorts the results according to sortMode. |
| Instantiate | Clones the object original and returns the clone. |
| InstantiateAsync | Captures a snapshot of the original object that's related to another GameObject and obtains an AsyncInstantiateOperation instance of the resulting objects. |
| Operator | Description |
|---|---|
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |
| operator == | Compares two object references to see if they refer to the same object. |