Skip to content

Texture2D 2022.2 bug #226

Description

@JunkBeat
  1. There are bugs related to reading/writing Texture2D in Unity 2022.2.
    To fix this I changed the code as follows and it worked:
if version >= (2022, 2, 0):  # 2022.2.0f1 and up
            self.m_IgnoreMipmapLimit = reader.read_boolean()
            reader.align_stream()
            self.m_MipmapLimitGroupName = reader.read_aligned_string()
            reader.align_stream()

. . .

if version >= (2022, 2, 0):  # 2022.2.0f1 and up
            writer.write_boolean(self.m_IgnoreMipmapLimit)
            writer.align_stream()
            writer.write_aligned_string(self.m_MipmapLimitGroupName)
            writer.align_stream()

Example file: https://drive.google.com/file/d/1TyA0H9myZyvk46MYVAVDW_aiu-Cm2miQ/view?usp=sharing

  1. I also encountered problems with poor compression in dxt1/dxt5. The visual artifacts appear on some textures.
    You can see it visually here (I used the same libraries as UnityPy):
    https://drive.google.com/file/d/1MZTIq6J_WSYR2IlZELi0rexfxKDO-WCZ/view?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions