2017-09-12 20:42:36 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2019-04-01 10:33:56 +00:00
|
|
|
<class name="PCKPacker" inherits="Reference" category="Core" version="3.2">
|
2017-09-12 20:42:36 +00:00
|
|
|
<brief_description>
|
|
|
|
</brief_description>
|
|
|
|
<description>
|
2019-11-12 13:53:55 +00:00
|
|
|
The [PCKPacker] is used to create packages in application runtime.
|
|
|
|
[codeblock]
|
|
|
|
var packer = PCKPacker.new()
|
2019-12-07 00:05:11 +00:00
|
|
|
packer.pck_start("test.pck")
|
2019-11-12 13:53:55 +00:00
|
|
|
packer.add_file("res://text.txt", "text.txt")
|
2019-12-07 00:05:11 +00:00
|
|
|
packer.flush()
|
2019-11-12 13:53:55 +00:00
|
|
|
[/codeblock]
|
|
|
|
The above [PCKPacker] creates package [b]test.pck[/b], then adds a file named [b]text.txt[/b] in the root of the package.
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<methods>
|
|
|
|
<method name="add_file">
|
|
|
|
<return type="int" enum="Error">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="pck_path" type="String">
|
|
|
|
</argument>
|
|
|
|
<argument index="1" name="source_path" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2019-11-12 13:53:55 +00:00
|
|
|
Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]).
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="flush">
|
|
|
|
<return type="int" enum="Error">
|
|
|
|
</return>
|
2019-12-07 00:05:11 +00:00
|
|
|
<argument index="0" name="verbose" type="bool" default="false">
|
2017-09-12 20:42:36 +00:00
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="pck_start">
|
|
|
|
<return type="int" enum="Error">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="pck_name" type="String">
|
|
|
|
</argument>
|
2019-12-07 00:05:11 +00:00
|
|
|
<argument index="1" name="alignment" type="int" default="0">
|
2017-09-12 20:42:36 +00:00
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
</methods>
|
|
|
|
<constants>
|
|
|
|
</constants>
|
|
|
|
</class>
|