Remove requirement of using Python 3.10 and below
- I added a 'legacy mode' flag to revert https://github.com/HearthSim/UnityPack/pull/101 as it caused problems on Rei - I tested the new setup (using custom unitypack) vs old one, and the output .asset files were bit-for-bit identical
This commit is contained in:
@@ -185,7 +185,7 @@ with open(sys.argv[1], "rb") as assetsFile:
|
||||
bundle = assetsFile.read()
|
||||
unityVersion = [int(x) for x in bundle[20:28].decode("utf-8").rstrip("\0").split(".")[:2]]
|
||||
assetsFile.seek(0)
|
||||
assets = Asset.from_file(assetsFile)
|
||||
assets = Asset.from_file(assetsFile, legacy_mode=True)
|
||||
for edit in edits:
|
||||
edit.getAssetInfo(assets, bundle)
|
||||
edits = [x for x in edits if x.id != None]
|
||||
|
||||
@@ -133,7 +133,7 @@ with open(sys.argv[1], "rb") as assetsFile:
|
||||
edits = newEdits
|
||||
|
||||
assetsFile.seek(0)
|
||||
assets = Asset.from_file(assetsFile)
|
||||
assets = Asset.from_file(assetsFile, legacy_mode=True)
|
||||
for id, obj in assets.objects.items():
|
||||
for edit in edits:
|
||||
edit.checkObject(id, obj, bundle)
|
||||
|
||||
Reference in New Issue
Block a user