ImmersiveRPG / GodotAsyncLoader

A Godot plugin to load, instance, and add scenes asynchronously using a background thread.
https://godotengine.org/asset-library/asset/1376
MIT License
37 stars 4 forks source link

Replace 3 singletons with 1 #10

Closed workhorsy closed 2 years ago

workhorsy commented 2 years ago

Instead of having SceneAdder, SceneLoader, and SceneSwitcher, just have AsyncLoader. This should also get rid of the cyclic import error that requires restart.

Then our API can be:

AsyncLoader.set_groups()
AsyncLoader.change_scene_async()
AsyncLoader.load_scene_async()
AsyncLoader.load_scene_async_with_cb()
AsyncLoader.load_scene_sync()