Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

f1 OSX build partial classes serialisation broken

Discussion in '2018.3 Beta' started by Foriero, Dec 10, 2018.

  1. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    577
    When we try to compile our project for OSX we get some weird behaviour for partial MonoBehaviour class. Even full reimport didn't work.

    Fields serialized in target platform, class 'RecordingExample'
    'seq' of type 'MidiSeqKaraokeScript'
    'bgMusic' of type 'UnityEngine.AudioClip'
    'bgMusicVolume' of type 'System.Single'
    'synthFileText' of type 'UnityEngine.UI.Text'
    'midiFileText' of type 'UnityEngine.UI.Text'
    'speedText' of type 'UnityEngine.UI.Text'
    'speedSlider' of type 'UnityEngine.UI.Slider'
    'semitoneText' of type 'UnityEngine.UI.Text'
    'semitoneSlider' of type 'UnityEngine.UI.Slider'

    Type '[MIDIUnified]RecordingExample' has an extra field 'bgMusicVolume' of type 'System.Single' in the player and thus can't be serialized (expected 'speedText' of type 'UnityEngine.UI.Text')
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  2. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    577
    Ok. workaround is simple. Just switch Net Api Compatibility to NETSTANDARD2.0 and back to NET4.x Seems like unity then internally sets things properly. Thank you, M.