ResourceFormatSaver
Inherits: Reference < Object Saves a specific resource type to a file.
Description
ResourceSaver singleton. This is accomplished thanks to multiple ResourceFormatSavers, each handling its own format and called automatically by the engine.
.tres (text-based), .res (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with class_name for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a ResourceFormatLoader.
Methods
Method Descriptions
- PoolStringArray get_recognized_extensions ( Resource resource ) virtual recognize).
- bool recognize ( Resource resource ) virtual Returns whether the given resource object can be saved by this saver.
- int save ( String path, Resource resource, int flags ) virtual
path.flagsis a bitmask composed with SaverFlags constants. @GlobalScope.OK on success, or an Error constant in case of failure.
