HearthSim / UnityPack

Python deserialization library for Unity3D Asset format
https://hearthsim.info/
MIT License
720 stars 153 forks source link

Added 5 Unity classes + Fix X-mirroring of models #103

Open j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz opened 3 years ago

j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz commented 3 years ago

I added 5 classes that I came along on my travels: MeshFilter, MeshRenderer, MeshCollider, SphereCollider and CapsuleCollider.

I also cleaned up renderer.py a bit.

sebastientromp commented 3 years ago

Hey! By any chance, would you know how to add support for the new (Unity 5.5+) shaders?

j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz commented 3 years ago

I would recommend looking at the YAML-dump of such a shader. unity2yaml ShaderSampleBundle > out.yaml vim out.yaml

sebastientromp commented 3 years ago

Thanks for the advice. Unfortunately, that doesn't help because the shader code itself is stored under compressedBlob and would need to be decompressed / decoded.

j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz commented 3 years ago

I see. The compression you're looking at is most likely done using the .net deflate class. But as for the code itself, I don't know. You might have use of tools such as Radare2, Ghidra or ILSpy.