Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
This repository was archived by the owner on May 9, 2025. It is now read-only.

Serialization Issue with WebGL #49

@AlexKnowles

Description

@AlexKnowles

Hello,

I had an issue with using your architecture with WebGL, specifically:
A scripted object (probably DanielEverland.ScriptableObjectArchitecture.Events.Listeners.Vector3GameEventListener?) has a different serialization layout when loading. (Read 340 bytes but expected 352 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

firefox_qfq4u6atam

This only seems to happen when I build and run (which reinforces the "Did you #ifdef UNITY_EDITOR a section…" bit). I've been able to fix the issue by removing #if UNITY_EDITOR from the serialized field _debugValue in the GameEventBase and BaseGameEventListener classes.

I thought I’d raise an issue just in case someone else experiences it. Probably won't cause too much harm by having some unused serialized fields in a build…

Oh, also, I may have done something a bit strange by putting your repo / code into its own namespace and Assembly Definition in Unity (So I can use it with unit tests). I’m certain this didn’t cause the problem but it’s probably worth noting. For reference, source is here: https://github.com/AlexKnowles/MineColony/tree/develop/Assets/ThirdParty/SO%20Architecture

Thanks for creating such an awesome free asset!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions