Scene Management System (sms
)
Allows for organized scene management, making development much faster.
Constants
Array[String] scene_nodes = [ "debug", "cutscene", "menu", "main", "background" ]
Used internally for adding, managing and removing scene collections.
Functions
bool add_scene(String scene_name, Node scene_class, CoreTypes.SceneType scene_type)
Adds a scene to some scene collection.
bool remove_scene(String scene_name, bool force_remove = false)
Don't set force_remove
to true
, thanks!
Removes a scene from some scene collection.
Node get_scene(String scene_name)
Returns a scene from some scene collection.
Returns null
if no scene with that name was found.
Node get_scene_collection(CoreTypes.SceneType scene_type)
Don't change any properties of the scene collection or free it, otherwise you may cause breakage.
Returns a scene collection node.
Useful if you want to change a child's index.
Array[Node] get_scene_collection_list(CoreTypes.SceneType scene_type)
Returns a list of all loaded scenes in some scene collection.
int get_scene_collection_count(CoreTypes.SceneType scene_type)
Returns the number of loaded scenes in some scene collection.
CoresTypes.SceneType exists(String scene_name)
Returns the scene collection a scene is loaded in.
Returns CoreTypes.SceneType.NONE
if no scene with that name was found.