godot::tools

Function save

pub fn save<T>(obj: Gd<T>, path: impl Into<GString>)
where T: Inherits<Resource>,
Expand description

⚠️ Saves a Resource-inheriting object into the file located at path.

See try_save for more information.

§Panics

If the resouce cannot be saved.

§Example

use godot::prelude::*;

save(Resource::new_gd(), "res://BaseResource.tres")

use godot::