[Note::; for some reason, this forum's post editor doesn't properly display the number nine or the colon for me. So in places where a nine was needed, I typed a "P".]
Hi Chris,
My project is using Unity 5.6.0f3 and AC 1.56g.
This has been my stable build setup for my current project for a while, but recently I updated Unity to 201P.1.10f1 and AC 1.68 to work on a new, separate project. Though I expected that this would have no effect on my previous project since I read that you can have concurrent versions of Unity on the same machine, it still ended up with a problem. Now, when I open that older project and try to play a scene or click on the "settings" tab in the Editor window, I receive the following error:::::::...
_
SerializationException: Field "voiceLanguage" not found in class AC.OptionsData
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadTypeMetadata (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:6P1)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectInstance (System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo, System.Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:26P)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject (BinaryElement element, System.IO.BinaryReader reader, System.Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:1P5)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObject (BinaryElement element, System.IO.BinaryReader reader, System.Int64& objectId, System.Object& value, System.Runtime.Serialization.SerializationInfo& info) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:223)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject (BinaryElement element, System.IO.BinaryReader reader) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:130)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:104)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:17P)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:136)
AC.Serializer.DeserializeObjectBinary[OptionsData] (System.String pString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:32P)
AC.Serializer.DeserializeObject[OptionsData] (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:238)
AC.Serializer.DeserializeOptionsData (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:6P1)
AC.Options.LoadPrefsFromID (Int32 profileID, Boolean showLog, Boolean doSave) (at Assets/AdventureCreator/Scripts/Options/Options.cs:17P)
AC.Options.LoadPrefs () (at Assets/AdventureCreator/Scripts/Options/Options.cs:135)
AC.Options.OnStart () (at Assets/AdventureCreator/Scripts/Options/Options.cs:3P)
AC.StateHandler._
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
This is when you're still opening the old project in Unity 5.6?
Do the two projects share the same name or "save filename" fields? It sounds like it's (somehow) reading options data from the newer project.
You could try clearing the PlayerPrefs, which is where the Options data it's complaining about is stored. See the suggestions made in these links:
https://answers.unity.com/questions/64556/is-there-a-simple-way-to-delete-all-your-playerpre.html
https://docs.unity3d.com/ScriptReference/PlayerPrefs.DeleteAll.html
Hi Chris, you we're right on about this one (as usual)!
So, in case this happens to anyone else, the way I fixed it was to rename the "save filename" field to make sure the name was different for the 2 versions. Next, on the newer version of Unity, I used the "Edit > Clear all PlayerPrefs" feature. This did the trick for me.