-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity 2019.3 exceptions BetterScriptableObject #5
Comments
Joining the bandwagon here. |
I started having similar exceptions starting with 2019.3.10f as well, and the issue definitely appears to be with the BetterScriptableObject class. When I ran into this issue, it looked like the only class dependent on this in Rucksack was LocalizationDatabase, which appears to use it as its base class for serialization support. To get myself operational again without digging deep into trying to fix the serialization problems in BetterScriptableObject, I changed LocalizationDatabase to use the serialization provided by Odin Inspector (which is another Devdog/Sirenix product) called SerializedScriptableObject. The logic behind that was because I assume they have similar purpose and implementation since they both implement Unity's ISerializationCallbackReceiver interface, but with the Odin Inspector version being more actively maintained for the latest Unity releases. I could be wrong about my assumptions, but hey it worked for me as a quick fix :) This requires you to own and install Odin Inspector to your project, which may not be ideal or possible for everyone, but if you do, it could get you going now. To try this, it's just a simple swap of base classes in LocalizationDatabase.cs. I used the latest release of Odin Inspector (v2.1.12 as of this post). Also, do this at your own risk and backup your databases if you want to try this because I cannot guarantee it will 100% work for you; however, I did not notice any issues thus far yet on my side with my existing databases, and importantly, I've been able to continue other work. Old New |
seems to work with me, tanx :) |
I get several exceptions/errors with Unity 2019.3. Top of callstack is marked fat.
[Exception] MissingMethodException: void UnityEngine.UnityAPICompatibilityVersionAttribute..ctor(string,string[])
MonoCustomAttrs.GetCustomAttributesBase() at <437ba245d8404784b9fbab9b439ac908>:0
MonoCustomAttrs.GetCustomAttributes() at <437ba245d8404784b9fbab9b439ac908>:0
Assembly.GetCustomAttributes() at <437ba245d8404784b9fbab9b439ac908>:0
DefaultSerializationBinder.RegisterAssembly() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.DefaultSerializationBinder..cctor() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.TwoWaySerializationBinder..cctor() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.ReadTypeEntry() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.EnterNode() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.ComplexTypeSerializer`1[T].ReadValue() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.BetterScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() at /Plugins/Devdog/General2/Runtime/Serialization/BetterScriptableObject.cs:54
[Error] Expected TypeName, TypeID or UnnamedNull entry flag for reading type data, but instead got the entry flag: Invalid.
Devdog.General2.BetterScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() at /Plugins/Devdog/General2/Runtime/Serialization/BetterScriptableObject.cs:54
[Exception] IOException: An attempt was made to move the position before the beginning of the stream.
MemoryStream.Seek() at <437ba245d8404784b9fbab9b439ac908>:0
BinaryDataReader.SkipPeekedEntryContent() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.ReadToNextEntry() at <36df1a84f4714997b4d3064932cfe35d>:0
BaseDataReader.SkipEntry() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.ExitNode() at <36df1a84f4714997b4d3064932cfe35d>:0
BaseDataReader.SkipEntry() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.ExitNode() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.ComplexTypeSerializer`1[T].ReadValue() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.Serializer`1[T].ReadValueWeak() at <36df1a84f4714997b4d3064932cfe35d>:0
UnitySerializationUtility.DeserializeUnityObject() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.BetterScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() at /Plugins/Devdog/General2/Runtime/Serialization/BetterScriptableObject.cs:54
[Error] Entry of type "PrimitiveArray" in node "_localizedStrings" is missing a name.
Devdog.General2.BetterScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() at /Plugins/Devdog/General2/Runtime/Serialization/BetterScriptableObject.cs:54
[Exception] InvalidOperationException: There are no nodes to pop.
BaseDataReaderWriter.PopNode() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataWriter.EndNode() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.ComplexTypeSerializer`1[T].WriteValue() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.Serializer`1[T].WriteValueWeak() at <36df1a84f4714997b4d3064932cfe35d>:0
UnitySerializationUtility.SerializeUnityObject() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.BetterScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize() at /Plugins/Devdog/General2/Runtime/Serialization/BetterScriptableObject.cs:59
[Exception] MissingMethodException: void UnityEngine.UnityAPICompatibilityVersionAttribute..ctor(string,string[])
MonoCustomAttrs.GetCustomAttributesBase() at <437ba245d8404784b9fbab9b439ac908>:0
MonoCustomAttrs.GetCustomAttributes() at <437ba245d8404784b9fbab9b439ac908>:0
Assembly.GetCustomAttributes() at <437ba245d8404784b9fbab9b439ac908>:0
DefaultSerializationBinder.RegisterAssembly() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.DefaultSerializationBinder..cctor() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.TwoWaySerializationBinder..cctor() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.ReadTypeEntry() at <36df1a84f4714997b4d3064932cfe35d>:0
BinaryDataReader.EnterNode() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.Serialization.ComplexTypeSerializer`1[T].ReadValue() at <36df1a84f4714997b4d3064932cfe35d>:0
Devdog.General2.BetterScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() at /Plugins/Devdog/General2/Runtime/Serialization/BetterScriptableObject.cs:54
The text was updated successfully, but these errors were encountered: