godot::preludeFunction load
pub fn load<T>(path: impl Into<GString>) -> Gd<T>
Expand description
⚠️ Loads a resource from the filesystem located at path
, panicking on error.
See try_load
for more information.
§Example
use godot::prelude::*;
let scene = load::<PackedScene>("res://path/to/Main.tscn");
§Panics
If the resource cannot be loaded, or is not of type T
or inherited.