Skip to content

Bug withTexture2DConverter #238

@AXiX-official

Description

@AXiX-official

Code

if __name__ == "__main__":
    filename = "22"
    env = UnityPy.load(f"assetbundles/{filename}")
    for obj in env.objects:
        if obj.type.name == "Texture2D":
            data = obj.read()
            # data.image.save(f"workspace/mod/{filename}.png")
            img = Image.open(f"workspace/mod/{filename}.png")
            data.set_image(img)
            data.save()
            break
    with open(f"workspace/mod/{filename}u", "wb") as f:
        f.write(env.file.save(packer="none"))

Error
No error message.

Bug
When I work with a series of textures in ETC2_RGBA8 format, 192*256 size, the texture in the modified file becomes blurry, however, there is no problem for other textures that are also in ETC2_RGBA8 format, but in different sizes.

To Reproduce

  • a copy of the file that causes the problem
  • following data:
    • Python version 3.8.10
    • UnityPy version 1.10.7

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions