However, when writing the type tree, UnityPy writes a fixed 0x0 in place of the dependency array length, then writes the array without a count field (with write_length being False by default). This results a corrupted file when a type actually has dependencies.
When reading the types from a version 21+ asset, UnityPy correctly reads the type tree, then correctly reads the list of dependencies as a regular "count + elements" array.
However, when writing the type tree, UnityPy writes a fixed 0x0 in place of the dependency array length, then writes the array without a count field (with
write_length
beingFalse
by default). This results a corrupted file when a type actually has dependencies.