PCKPacker
Inherits: Reference < Object Creates packages that can be loaded into a running project.
Description
PCKPacker is used to create packages that can be loaded into a running project using ProjectSettings.load_resource_pack.
var packer = PCKPacker.new()packer.pck_start("test.pck")packer.add_file("res://text.txt", "text.txt")packer.flush()
PCKPacker creates package test.pck, then adds a file named text.txt at the root of the package.
Methods
Method Descriptions
- Error add_file ( String pck_path, String source_path )
source_pathfile to the current PCK package at thepck_pathinternal path (should start withres://).
- Error flush ( bool verbose=false )
add_file calls since the last flush. If
verboseistrue, a list of files added will be printed to the console for easier debugging.
- Error pck_start ( String pck_name, int alignment=0 )
pck_name. The.pckfile extension isn’t added automatically, so it should be part ofpck_name(even though it’s not required).
