@@ -130,20 +130,23 @@ def __init__(self, reader):
130
130
self .m_Width = reader .read_int ()
131
131
self .m_Height = reader .read_int ()
132
132
self .m_CompleteImageSize = reader .read_int ()
133
- if version >= (2020 ,): # 2020.1 and up
133
+ if version >= (2020 , 1 ): # 2020.1 and up
134
134
self .m_MipsStripped = reader .read_int ()
135
135
self .m_TextureFormat = TextureFormat (reader .read_int ())
136
- if version [: 2 ] < (5 , 2 ): # 5.2 down
136
+ if version < (5 , 2 ): # 3.4.0 - 5.1.5f1
137
137
self .m_MipMap = reader .read_boolean ()
138
- else :
138
+ else : # 5.2.0f2 and up
139
139
self .m_MipCount = reader .read_int ()
140
140
141
141
if version >= (2 , 6 ): # 2.6 and up
142
142
self .m_IsReadable = reader .read_boolean () # 2.6 and up
143
143
if version >= (2020 ,): # 2020.1 and up
144
144
self .m_IsPreProcessed = reader .read_boolean ()
145
- if version >= ( 2019 , 3 ): # 2019.3 and up
145
+ if ( 2019 , 3 ) <= version < ( 2022 , 2 , 0 ): # 2019.3.0f6 - 2022.2.0a18
146
146
self .m_IgnoreMasterTextureLimit = reader .read_boolean ()
147
+ if version >= (2022 , 2 , 0 ): # 2022.2.0f1 and up
148
+ self .m_IgnoreMipmapLimit = reader .read_boolean ()
149
+ self .m_MipmapLimitGroupName = reader .read_aligned_string ()
147
150
if (3 ,) <= version [:2 ] <= (5 , 4 ): # 3.0 - 5.4
148
151
self .m_ReadAllowed = reader .read_boolean ()
149
152
if version >= (2018 , 2 ): # 2018.2 and up
@@ -188,7 +191,7 @@ def save(self, writer: EndianBinaryWriter = None):
188
191
if version >= (2020 ,): # 2020.1 and up
189
192
writer .write_int (self .m_MipsStripped )
190
193
writer .write_int (self .m_TextureFormat .value )
191
- if version [: 2 ] < (5 , 2 ): # 5.2 down
194
+ if version < (5 , 2 ): # 5.2 down
192
195
writer .write_boolean (self .m_MipMap )
193
196
else :
194
197
writer .write_int (self .m_MipCount )
@@ -197,8 +200,11 @@ def save(self, writer: EndianBinaryWriter = None):
197
200
writer .write_boolean (self .m_IsReadable ) # 2.6 and up
198
201
if version >= (2020 ,): # 2020.1 and up
199
202
writer .write_boolean (self .m_IsPreProcessed )
200
- if version >= ( 2019 , 3 ): # 2019.3 and up
203
+ if ( 2019 , 3 ) <= version < ( 2022 , 2 , 0 ): # 2019.3.0f6 - 2022.2.0a18
201
204
writer .write_boolean (self .m_IgnoreMasterTextureLimit )
205
+ if version >= (2022 , 2 , 0 ): # 2022.2.0f1 and up
206
+ writer .write_boolean (self .m_IgnoreMipmapLimit )
207
+ writer .write_aligned_string (self .m_MipmapLimitGroupName )
202
208
if (3 ,) <= version [:2 ] <= (5 , 4 ): # 3.0 - 5.4
203
209
writer .write_boolean (self .m_ReadAllowed ) # 3.0 - 5.4
204
210
if version >= (2018 , 2 ): # 2018.2 and up
0 commit comments