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.
Code
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