SceneBase.OnLoadAsync(CancellationToken, IProgress) Method
Definition¶
Namespace: Brine2D.Engine
Called when the scene is being loaded. Override to load assets. Always pass cancellationToken to async asset-loading calls.
protected internal virtual System.Threading.Tasks.Task OnLoadAsync(System.Threading.CancellationToken cancellationToken, System.IProgress<float>? progress=null);
Parameters¶
cancellationToken System.Threading.CancellationToken
Token to observe for cancellation.
progress System.IProgress<System.Single>
Reports scene loading progress (0.0–1.0) to the active loading screen.
Call progress?.Report(value) at meaningful milestones during your load.
The framework maps the reported value onto the loading screen's asset-loading range
automatically. Is null when no loading screen is displayed.