Skip to content

SceneBase.OnUnloadAsync(CancellationToken) Method

Definition

Namespace: Brine2D.Engine

Called during unloading. Override to clean up resources. Always pass cancellationToken to async cleanup calls. Called on a background thread — do not call SDL3-backed services (Renderer, Audio, Input) here. Use OnExit() for any main-thread cleanup that must precede unloading.

protected internal virtual System.Threading.Tasks.Task OnUnloadAsync(System.Threading.CancellationToken cancellationToken);

Parameters

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task