Closed vehumet closed 7 years ago
For some unity files, unityextract prints following error,
struct.error: unpack requires a bytes object of length 5
I'm not familiar to python syntax (such as * notation), so I'm just pasting my quick fix of this problem. I refered this url: http://stackoverflow.com/questions/5773607/python-what-is-the-most-efficient-way-to-generate-padding
In utils.py,
def read(self, *args): return self.buf.read(*args)
to this:
def read(self, args): readResult = self.buf.read(args) if (len(readResult) < args): readResult = readResult .ljust(args, b'\0') return readResult
I omitted * of args for just make it run with least effort ;). Sorry for that. Sorry for not uploading problematic asset file, for it's confidential one.
args
Thank you.
I close this because it's duplication of https://github.com/HearthSim/UnityPack/issues/23
For some unity files, unityextract prints following error,
I'm not familiar to python syntax (such as * notation), so I'm just pasting my quick fix of this problem. I refered this url: http://stackoverflow.com/questions/5773607/python-what-is-the-most-efficient-way-to-generate-padding
In utils.py,
to this:
I omitted * of
args
for just make it run with least effort ;). Sorry for that. Sorry for not uploading problematic asset file, for it's confidential one.Thank you.