neon-age / Smart-Hierarchy

Human-friendly hierarchy for Unity.
MIT License
599 stars 43 forks source link

Any ways to remove serialization errors on builds? #29

Closed TheXRMonk closed 3 years ago

TheXRMonk commented 3 years ago

I get these warnings for each Hierarchy Collection in my WebGL build;

A scripted object (probably AV.Hierarchy.Collection?) has a different serialization layout when loading. (Read 32 bytes but expected 40 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts? Followed by warning; The referenced script on this Behaviour (Game Object '*GOName*') is missing!

Normally I would just ignore these, but as it's WebGL it seems to create other issues down the line.

neon-age commented 3 years ago

Oh, seems like I forgot to strip Collection components from build.

but as it's WebGL it seems to create other issues down the line.

What kind of issues you think it causes?

TheXRMonk commented 3 years ago

Oh, seems like I forgot to strip Collection components from build.

but as it's WebGL it seems to create other issues down the line.

What kind of issues you think it causes?

I am doing a WebGL WebXR demo using De-Panther's extension and found some issues that we for now only can track to these warnings/errors - I am digging a bit more, but it is most likely unrelated issues.

neon-age commented 3 years ago

Pushed a commit, can you try it from master?

neon-age commented 3 years ago

I also noticed another issue with disabled collections that have unchecked 'Keep Transform' - their children are not being stripped

TheXRMonk commented 3 years ago

Pushed a commit, can you try it from master?

Confirmed - All good now :)

neon-age commented 3 years ago

The fix and forementioned stripping change are available in 0.3.1-pre.9 now