Skip to main content

is_singleton_available

Function is_singleton_available 

pub fn is_singleton_available<T>() -> bool
where T: Singleton,
Expand description

Return whether a certain singleton can currently be retrieved from Godot.

This differs from is_class_available(): a singleton instance may become available later than its class API. For example, some core singletons are available at Core, while most singletons only appear at Scene or later.

See also this section in ExtensionLibrary.