Class ScyllaSceneUnloadedEvent
Published by ScyllaSceneManager after a scene has finished being unloaded by a managed operation, whether the unload was requested explicitly or was a side effect of a LoadSceneMode.Single load replacing every currently loaded scene.
Inherited Members
Namespace: Scylla.Core.Scenes
Assembly: ScyllaCore.dll
Syntax
public sealed class ScyllaSceneUnloadedEvent : ScyllaEvent
Remarks
For an explicit unload, this event is published once the underlying Unity or Addressables unload operation completes, and it is the only event ScyllaSceneManager publishes for that operation (there is no separate unload-progress event). For a single-mode load, one instance of this event is published for each scene the load replaced; publishing happens after the load finalizes, immediately before ScyllaSceneLoadedEvent for the newly loaded scene, mirroring the order in which ScyllaSceneWillUnloadEvent instances were published for those same scenes at the start of the load.
Only the scene name is carried: the Unity Scene handle is no longer valid
after the unload, so exposing it would invite use-after-unload bugs. Modules that
were children of the unloaded scene have already self-unregistered from the
framework by the time this event fires.
Like every ScyllaEvent, a handler can call StopPropagation() to keep lower-priority subscribers of this same event from receiving it. ScyllaSceneManager never reads IsCancelled after publishing it; the unload has already completed by the time this event fires, so there is nothing left to cancel.
Constructors
ScyllaSceneUnloadedEvent(string)
Initializes a new ScyllaSceneUnloadedEvent.
Declaration
public ScyllaSceneUnloadedEvent(string sceneName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sceneName | The name of the scene that was unloaded. |
Properties
SceneName
Gets the name of the scene that was unloaded.
Declaration
public string SceneName { get; }
Property Value
| Type | Description |
|---|---|
| string | The Unity scene name (not a path or asset GUID). There is no accompanying UnityEngine.SceneManagement.Scene handle on this event because the handle is no longer valid once the unload has completed. |