Search Unity

How to fix these build errors?

Discussion in 'Editor & General Support' started by doozler, Mar 31, 2019.

  1. doozler

    doozler

    Joined:
    Mar 10, 2018
    Posts:
    6
    There are no errors in editor or the game view and the build itself plays fine. When I create a development build I notice these errors and, not for lack of trying, I cannot seem to figure out what they are or how to fix them.

    I feel like it's related to this:
    https://www.reddit.com/r/Unity3D/comments/5jkymu/a_script_behaviour_has_a_different_serialization/
    https://github.com/Unity-Technologies/AssetBundles-Browser/issues/32

    but I have no idea what I "#ifdef 'ed" or where in the thousands of scripts the offending culprit would be. Any hints for this Unity noob would be appreciated. Thank you
     

    Attached Files:

  2. doozler

    doozler

    Joined:
    Mar 10, 2018
    Posts:
    6
    There are many shader warnings I don't like too, but this error occurs many times:

    (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializedFile.cpp Line: 2001)
    The referenced script on this Behaviour (Game Object '<null>') is missing!
    (Filename: C:\buildslave\unity\build\Runtime/Mono/ManagedMonoBehaviourRef.cpp Line: 294)
    A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 44 bytes but expected 184 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    Between my own scripts and the asset store stuff, there are many instances of "#if UNITY_EDITOR", how can I isolate which ones need restructured?
     
    Last edited: Mar 31, 2019