Search Unity

BGCurve (free Bezier Spline Editor) support thread [OFFICIAL]

Discussion in 'Assets and Asset Store' started by BansheeGz, Feb 18, 2017.

  1. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    622
    Hiya,

    Piloting this asset. So far very impressed! However, when I run a build (Unity 2019), Android or PC, I get this error inside the executable:

    A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 44 bytes but expected 72 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?​

    Googling shows it's caused by [SerializeField] fields inside #if UNITY_EDITOR directives. The only such serialisation I have is inside BGCurve scripts.

    How do I manage this so builds run correctly?
     
  2. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    269
    Hello, sorry, we could not reproduce this issue
    Here is the example project - https://drive.google.com/file/d/1y_ZEaiRXkX_2dPpCUjXiaTYMacCNfqT6/view?usp=sharing which only have one single BGCurve asset
    One curve is loaded as part of the scene, another one is loaded via prefab and yet another one is loaded from Resources folder.
    All three are working fine on Windows and Android.
    All test scenes also work ok
    Unity 2019.4.31
     
  3. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    622
    Cheers. I shouldn't have bothered you so early as I hadn't tried a proper investigation. After the rest of yesterday investigating starting from an empty project and building up with BGC, it seems related to linking to BGCurve within Scriptable Objects, so possibly not anything to do with you. loading the project now, the SO that refers to GBC is missing its script, suggesting an internal build issue with Unity and SO's using Serialised #Editor fields.
     
  4. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    269
    Not a problem at all, thank you for the update!
    We tried to reference a curve from a scriptable object- still no errors
    Anyway, if you think these #ifdef UNITY_EDITOR blocks may cause some issues- please, let me know
     
unityunity