UnityPy
UnityPy copied to clipboard
How to replace texture2d from .splitN file?
How to replace texture2d from .splitN file?
see https://github.com/K0lb3/UnityPy/blob/e4d834527ae5dd13d43bbef4d31572f92a4c8afe/UnityPy/environment.py#L49 or https://github.com/nesrak1/UABEA/blob/fe71d7b5ca742388d8529894bf25e8090089e82b/UABEAvalonia/MainWindow.axaml.cs#L694 or https://github.com/SeriousCache/UABE/blob/edc33b430f58acfd5501535731a22edfc7440ec9/AssetsTools/AssetsFileReader.cpp#L908
Sorry for the late reply.
split files are just a normal SerializedFile split into multiple files. So in theory, you can simply save the loaded (split) SerializedFile and replace all the .splitN files with the merged one. I haven't come around to test this myself yet tho.
Merging into one file is possible, but the merged file will be very large and will exceed the limits of Google Play, so how to split the large file?
Sorry for the late reply again. I guess that you can also try simply splitting the final file yourself at the same size as the original. So e.g.
split_data = env.file.save()
orig_split_size: int
name: str
for i,offset in enumerate(range(0, len(split_data, orig_split_size)):
with open(f"{name}.split{i}", "wb") as f:
f.write(split_data[offset:offset+orig_split_size])