Hey there. I keep getting this error when re-entering a scene I've visited before. What could be the cause?
(It's happening when I've set the platform to iOS)
InvalidOperationException: <VisibilityData xmlns=''> was not expected
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap)
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot ()
System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader)
Rethrow as InvalidOperationException: There is an error in XML document.
System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader)
System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader)
System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream)
AC.Serializer.DeserializeObjectXML[HotspotData] (System.String pXmlizedString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:354)
AC.Serializer.DeserializeObject[HotspotData] (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:234)
AC.Serializer.LoadScriptData[HotspotData] (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:665)
AC.RememberHotspot.LoadData (System.String stringData) (at Assets/AdventureCreator/Scripts/Save system/RememberHotspot.cs:83)
AC.ConstantID.LoadData (System.String stringData, Boolean restoringSaveFile) (at Assets/AdventureCreator/Scripts/Save system/ConstantID.cs:75)
AC.LevelStorage.SendDataToScene (AC.SingleLevelData levelData, Boolean restoringSaveFile, AC.SubScene subScene) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:136)
AC.LevelStorage.ReturnCurrentLevelData (Boolean restoringSaveFile) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:77)
AC.SceneSettings.OnStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:104)
AC.MultiSceneChecker.Start () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:72)
Comments
It could be an issue between the XML encoding and the iOS version on your device. Before you enter the previously-visited scene, save the game. This will generate a save file in your PersistentDataPath - the AC Debug log will print out the file location. If you can find it and post the contents here, it should give us a clue as to what's wrong.
Alternatively, you can try checking Save in Json format? (Experimental) in the "Save game settings" section of the Settings Manager.
As this is only happening in one scene, we'll assume at this point that this is down to a single problematic RememberHotspot component, rather than all Remember scripts in your game. We'll need to determine, then, which one (or ones) are causing the problem - so the next step wil be to disable all such components in your scene, test that it runs in iOS, and then re-enable them in turn until it no longer runs. I appreciate that's a little tedious, but once we know which one is causing trouble, we can look into it properly. It may be that you need to PM me the scene at that point, but let's isolate the issue first and see what we've got.