Skip to content

Commit

Permalink
Texture2D - 2022 fix (K0lb3#227)
Browse files Browse the repository at this point in the history
* Texture2D - 2022 fix

* 1.10.12 version bump
  • Loading branch information
K0lb3 authored Jan 26, 2024
1 parent a090a09 commit 0364b00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion UnityPy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.10.11"
__version__ = "1.10.12"

from .environment import Environment
from .helpers.ArchiveStorageManager import set_assetbundle_decrypt_key
Expand Down
2 changes: 2 additions & 0 deletions UnityPy/classes/Texture2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def __init__(self, reader):
self.m_IgnoreMasterTextureLimit = reader.read_boolean()
if version >= (2022, 2, 0): # 2022.2.0f1 and up
self.m_IgnoreMipmapLimit = reader.read_boolean()
self.align_stream()
self.m_MipmapLimitGroupName = reader.read_aligned_string()
if (3,) <= version[:2] <= (5, 4): # 3.0 - 5.4
self.m_ReadAllowed = reader.read_boolean()
Expand Down Expand Up @@ -204,6 +205,7 @@ def save(self, writer: EndianBinaryWriter = None):
writer.write_boolean(self.m_IgnoreMasterTextureLimit)
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)
if (3,) <= version[:2] <= (5, 4): # 3.0 - 5.4
writer.write_boolean(self.m_ReadAllowed) # 3.0 - 5.4
Expand Down

0 comments on commit 0364b00

Please sign in to comment.