public class ResourceFormatSaver : Reference
The engine can save resources when you do it from the editor, or when you call ResourceSaver.Save(string, Godot.Resource, int). This is accomplished with multiple
ResourceFormatSavers, each handling its own format.
By default, Godot saves resources as
.resor another built-in format, but you can choose to create your own format by extending this class. You should give it a global class name with
class_namefor it to be registered. You may as well implement a ResourceFormatLoader.
public virtual string GetRecognizedExtensions(Resource resource)
public virtual bool Recognize(Resource resource)
public virtual int Save(string path, Resource resource, int flags)
Saves the given resource object to a file.
flagsis a bitmask composed with
FLAG_*constants defined in ResourceSaver. Returns
OKon success, or an
ERR_*constant listed in [@GlobalScope] if it failed.