mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
2e39e38c10
Fix various code formatting issues and argument names.
50 lines
2.0 KiB
XML
50 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="ResourceFormatSaver" inherits="Reference" category="Core" version="3.1">
|
|
<brief_description>
|
|
Saves a specific resource type to a file.
|
|
</brief_description>
|
|
<description>
|
|
The engine can save resources when you do it from the editor, or when you call [method ResourceSaver.save]. This is accomplished with multiple [code]ResourceFormatSaver[/code]s, each handling its own format.
|
|
By default, Godot saves resources as [code].tres[/code], [code].res[/code] or 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 [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatLoader].
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<demos>
|
|
</demos>
|
|
<methods>
|
|
<method name="get_recognized_extensions" qualifiers="virtual">
|
|
<return type="PoolStringArray">
|
|
</return>
|
|
<argument index="0" name="resource" type="Resource">
|
|
</argument>
|
|
<description>
|
|
Gets the list of extensions for files this saver is able to write.
|
|
</description>
|
|
</method>
|
|
<method name="recognize" qualifiers="virtual">
|
|
<return type="bool">
|
|
</return>
|
|
<argument index="0" name="resource" type="Resource">
|
|
</argument>
|
|
<description>
|
|
Returns true if the given resource object can be saved by this saver.
|
|
</description>
|
|
</method>
|
|
<method name="save" qualifiers="virtual">
|
|
<return type="int">
|
|
</return>
|
|
<argument index="0" name="path" type="String">
|
|
</argument>
|
|
<argument index="1" name="resource" type="Resource">
|
|
</argument>
|
|
<argument index="2" name="flags" type="int">
|
|
</argument>
|
|
<description>
|
|
Saves the given resource object to a file. [code]flags[/code] is a bitmask composed with [code]FLAG_*[/code] constants defined in [ResourceSaver]. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<constants>
|
|
</constants>
|
|
</class>
|