Godot Version
4.7.1
Question
Best way to handle cancelling scene streaming requests?
I’m building a custom scene streaming system for an open world where a SceneStreaming node asynchronously loads a packed scene when the player enters a load trigger and unloads it when leaving an unload trigger. The load and unload triggers have a margin between them to reduce rapid loading/unloading, but it’s still possible for the player to reverse direction before loading finishes.
The packed scene loaded by a SceneStreaming node can itself contain additional SceneStreaming nodes for streaming smaller regions. In other words, child streaming nodes only exist after their parent scene has been loaded.
From what I can tell, ResourceLoader doesn’t seem to provide a way to cancel an asynchronous resource load once it has started. Is that correct?
If that’s the case, what’s the recommended architecture? Should I let the load finish and simply discard the result if it’s no longer needed? What should i do?