+1
Fixed

Serialization errors on Unity 2018.3

Daniel C. Robbins 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 3

Unity 2018.3.0b7

Brand new project, imported Bolt 1.4.0.f7

Console errors:
--------------------

Unable to find style 'LargeTextField' in skin 'LightSkin' Layout
UnityEngine.GUIStyle:op_Implicit(String)
Ludiq.Styles:.cctor()
System.Object:__icall_wrapper_mono_generic_class_init(IntPtr)
Ludiq.NamingSchemePage:OnContentGUI()
Ludiq.Page:DrawContent()
Ludiq.Wizard:OnGUI()
Ludiq.WrappedEditorWindow:OnGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
-----

[Deserialization] Object reference at index #0 does not match target type (UnityEngine.Object != UnityEngine.Texture). Defaulting to null.

UnityEngine.Debug:LogWarning(Object, Object)
Ludiq.Serialization:HandleResult(String, fsResult, Object)
Ludiq.Serialization:DeserializeJson(fsSerializer, String, Object&, Boolean)
Ludiq.Serialization:DeserializeInto(SerializationData, Object&, Boolean)
Ludiq.LudiqEditorWindow:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
-----

[Deserialization] Object reference at index #0 does not match target type (UnityEngine.Object != UnityEngine.Texture). Defaulting to null.

UnityEngine.Debug:LogWarning(Object, Object)
Ludiq.Serialization:HandleResult(String, fsResult, Object)
Ludiq.Serialization:DeserializeJson(fsSerializer, String, Object&, Boolean)
Ludiq.Serialization:DeserializeInto(SerializationData, Object&, Boolean)
Ludiq.LudiqEditorWindow:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
----

[Deserialization] Object reference at index #0 does not match target type (UnityEngine.Object != UnityEngine.Texture). Defaulting to null.

UnityEngine.Debug:LogWarning(Object, Object)
Ludiq.Serialization:HandleResult(String, fsResult, Object)
Ludiq.Serialization:DeserializeJson(fsSerializer, String, Object&, Boolean)
Ludiq.Serialization:DeserializeInto(SerializationData, Object&, Boolean)
Ludiq.LudiqEditorWindow:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Daniel,

Sorry you're having those issues. Seems like Unity deprecated some styles behind the scenes in 2018.3 beta.

When do you get these errors exactly? Do they prevent you from setting up and using Bolt?

Fixed in Next Version

Hi Daniel! I found and fixed the warning associated with LargeTextField for v.1.4.0f10.

I have not been able to reproduce the deserialization errors you have been getting, but I suggest resetting your window layout if they persist; it seems related to that.

EDIT: Correction, I've been able to reproduce them on 2018.3.0b7, but not 2018.3.0b5. Nothing seems to be affected though, and I can't find any related breaking change in the patch notes, so I'm assuming something internal changed behind the scenes. If you have any serious problem from those warnings, please let me know.

EDIT 2: Ok, I found & fixed the warnings for editor window deserialization. For some reason, Unity now tries to serialize the textures of the window's titleContent (not sure if it did before), but when deserializing, it can't find them (obviously) and there's a type mismatch error. v.1.4.0f10 will silently ignore this case and null the reference in case of a mismatch if the actual instance is found to be a Unity pseudo-null.