Inherits: Reference < Object

Creates packages that can be loaded into a running project.


The PCKPacker is used to create packages that can be loaded into a running project using ProjectSettings.load_resource_pack.

var packer = PCKPacker.new()
packer.add_file("res://text.txt", "text.txt")

The above PCKPacker creates package test.pck, then adds a file named text.txt at the root of the package.


Erroradd_file ( String pck_path, String source_path )
Errorflush ( bool verbose=false )
Errorpck_start ( String pck_name, int alignment=0 )

Method Descriptions

Adds the source_path file to the current PCK package at the pck_path internal path (should start with res://).

Writes the files specified using all add_file calls since the last flush. If verbose is true, a list of files added will be printed to the console for easier debugging.

Creates a new PCK file with the name pck_name. The .pck file extension isn’t added automatically, so it should be part of pck_name (even though it’s not required).

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 2020-03-07 at 01:37:06. It's the English Stable version because it's what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.