Description
The IsAdditive
property of the SceneLoadOptions
class determines whether the scene should be loaded additively. When set to true
, the new scene will be loaded on top of the existing scene, allowing multiple scenes to be active simultaneously. If set to false
, the current scene will be unloaded before the new scene is loaded.
Usage
To use the IsAdditive
property, create an instance of SceneLoadOptions
and set the property to true
or false
depending on whether you want to load the scene additively or not.
Example
// Create a new instance of SceneLoadOptions
SceneLoadOptions loadOptions = new SceneLoadOptions();
// Set the IsAdditive property to true to load the scene additively
loadOptions.IsAdditive = true;
// Use the loadOptions when loading a scene
SceneManager.LoadScene("NewScene", loadOptions);