ResourceSaver
Singleton for saving Godot-specific resource types.
Singleton for saving Godot-specific resource types to the filesystem.
enum SaverFlags:
- FLAG_RELATIVE_PATHS = 1 —- Save the resource with a path relative to the scene which uses it.
- FLAG_BUNDLE_RESOURCES = 2 —- Bundles external resources.
- FLAG_CHANGE_PATH = 4 —- Changes the of the saved resource to match its new location.
- FLAG_SAVE_BIG_ENDIAN = 16 —- Save as big endian (see File.endian_swap).
- FLAG_COMPRESS = 32 —- Compress the resource on save using . Only available for binary resource types.
- FLAG_REPLACE_SUBRESOURCE_PATHS = 64 —- Take over the paths of the saved subresources (see Resource.take_over_path).
Returns the list of extensions available for saving a resource of a given type.
- save ( String path, resource, SaverFlags flags=0 )
The flags
bitmask can be specified to customize the save behavior.
Returns on success.