Struct PCKPacker
Creates packages that can be loaded into a running project.
struct PCKPacker
;
The PCKPacker
is used to create packages that can be loaded into a running project using ProjectSettings
.
var packer = PCKPacker.new() packer.pck_start("test.pck") packer.add_file("res://text.txt", "text.txt") packer.flush()
The above PCKPacker
creates package test
, then adds a file named text
at the root of the package.
Methods
Name | Description |
---|---|
addFile
|
Adds the source_path file to the current PCK package at the pck_path internal path (should start with res:// ).
|
flush
|
Writes the files specified using all addFile calls since the last flush. If verbose is true , a list of files added will be printed to the console for easier debugging.
|
pckStart
|
Creates a new PCK file with the name pck_name . The file extension isn't added automatically, so it should be part of pck_name (even though it's not required).
|