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.
Checking the stable version of the documentation...
PackedDataContainerRef
Obsoleto: Use @GlobalScope.var_to_bytes() or FileAccess.store_var() instead. To enable data compression, use PackedByteArray.compress() or FileAccess.open_compressed().
Hereda: RefCounted < Object
Una clase interna utilizada por PackedDataContainer para empaquetar arrays y diccionarios anidados.
Descripción
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 = PackedDataContainer.new()
packed.pack([1, 2, 3, ["nested1", "nested2"], 4, 5, 6])
for element in packed:
if element is PackedDataContainerRef:
for subelement in element:
print("::", subelement)
else:
print(element)
Prints:
1
2
3
::nested1
::nested2
4
5
6
Métodos
size() const |
Descripciones de Métodos
Devuelve el tamaño del contenedor empaquetado (véase Array.size() y Dictionary.size()).