HearthSim / UnityPack

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

Vertex and Normal data mixed up in Unity 2018.2 AssetBundles #78

Open rogangriffin opened 5 years ago

rogangriffin commented 5 years ago

When I use the export.py functions on Unity 2018.2 AssetBundles, the vertices and normals get mixed up in the arrays. Vertices array looks like 1 vertex Vector3, then 3 normal Vector3s, then 1 vertex Vector3, then 3 normal Vectors, etc. Normals then has vertex position data mixed in. I guess their format changed. Attaching an AssetBundle (simple cube) from 2018.2. cube.assetbundle.zip

jleclanche commented 5 years ago

Thanks for the attachment -- any chance you can PR a fix?

rogangriffin commented 5 years ago

If I figure out what the pattern of change is I will.

rogangriffin commented 5 years ago

Pull request is here: https://github.com/HearthSim/UnityPack/pull/79 Sorry about the whitespace changes. I am going to be converting a ton of Unity 2018 assets with this so I will update as I find more issues.