K0lb3 / UnityPy

UnityPy is python module that makes it possible to extract/unpack and edit Unity assets
MIT License
809 stars 123 forks source link

Reading MonoBehaviors through the type tree is normal, but it becomes abnormal after saving. #181

Closed yeooii closed 11 months ago

yeooii commented 1 year ago

a b

yeooii commented 1 year ago

I am using obj.read When typetree() is used, all content is normal. But I use obj.save After typetree() is saved, it becomes the image shown above.

yeooii commented 1 year ago

The image on the left is before modification, while the image on the right is modified using the type tree

K0lb3 commented 1 year ago

The issue is likely related to https://github.com/K0lb3/TypeTreeGenerator/pull/2 in case you used generated typetrees. If not, can you provide a sample asset?

AhmedAhmedEG commented 1 year ago

Please provide sample code, did you given the nodes as input to .save_typetree() function?

AhmedAhmedEG commented 1 year ago

The issue is likely related to K0lb3/TypeTreeGenerator#2 in case you used generated typetrees. If not, can you provide a sample asset?

His problem is that after saving an object, some values changes, that merge request you mentioned removed extra indentations that was being added to type tree json files created by TypeTreeGenerator, so It's totally different from his problem.