PCKPacker

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.loadResourcePack.

More...

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

addFile
GodotError addFile(String pck_path, String source_path)

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

flush
GodotError flush(bool verbose)

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.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(PCKPacker other)
opEquals
bool opEquals(typeof(null) n)
pckStart
GodotError pckStart(String pck_name, long alignment)

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).

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
PCKPacker _new()

Construct a new instance of PCKPacker. Note: use memnew!PCKPacker instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

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.pck, then adds a file named text.txt at the root of the package.

Meta