Skip to main content

Module array

Module array 

Source
Expand description

Array slices (classes/legacy_patch/Texture2DArray.py:12-43) use integer division and range stepping, retaining per-slice mip tails. Platform 0 is UnityPy’s convention; Switch/Xbox arrays are explicitly Tier U. Empty inline data uses the supplied resource (Tier B). The eight 8-bit integer entries use the corresponding UNorm/SNorm channel counts (B/C), as PARITY section 19.2 specifies. Signed byte conversion is the closed form in section 17.1; no 16-bit decoder is used for those stored bytes. The six ASTC HDR graphics formats use the corresponding HDR decoders despite the pinned UnityPy map omitting them (Tier B).

Structs§

ArrayFields
Array metadata; data_size includes every slice’s mip chain.
ArrayPlan
Length-only array plan, with a bound for retained images and the list.

Enums§

ArrayError
Array mapping, layout or decode failure, without allocating an error message.

Functions§

decode
Decode each slice from inline data, falling back on a resolved resource when inline is empty. Output table and all pixels are charged before allocation.
images
Read a Texture2DArray’s fields and resource, then decode all slices through the shared array path. Empty inline bytes fall back to m_StreamData. The Environment owns resource charges; returned images use meter.
plan
Plan after resolving inline/resource data, without reading or allocating it.
texture_format
Corrected mapping for the eight 8-bit integer graphics formats and six ASTC HDR graphics formats, otherwise the original map. The byte correction’s targets are enums/GraphicsFormat.py:184-191; ASTC HDR adds the corresponding HDR TextureFormat values omitted by UnityPy’s map (PARITY section 19.2).
unitypy_texture_format
UnityPy’s original map, including its eight wrong 8-bit integer targets (enums/GraphicsFormat.py:179-277). Call texture_format for decoding.