Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.


Inherits: RefCounted < Object

An internal class used by PackedDataContainer to pack nested arrays and dictionaries.


When packing nested containers using PackedDataContainer, they are recursively packed into PackedDataContainerRef (only applies to Array and Dictionary). Their data can be retrieved the same way as from PackedDataContainer.

var packed =
packed.pack([1, 2, 3, ["abc", "def"], 4, 5, 6])

for element in packed:
    if element is PackedDataContainerRef:
        for subelement in element:
            print("::", subelement)

# Prints:
# 1
# 2
# 3
# ::abc
# ::def
# 4
# 5
# 6



size ( ) const

Method Descriptions

int size ( ) const

Returns the size of the packed container (see Array.size and Dictionary.size).