Forum rules - please read before posting.

Version 1.50 - Improved navigation, UFPS support and multi-scene editing

13

Comments

  • And what errors are you getting, exactly?
  • Well, when I press play after making a change on the player prefab, it seems to just not load the player into the scene at all - it's not in the hierarchy. But the console doesn't throw any errors.

    The errors come when I switch from mouse controls to keyboard/controller mode (I allow the player to switch between these in-game, though the same errors happen if I manually change the control mode in the AC window before pressing play). It makes sense though because there can't be a hotspot proximity check etc if there is no player to check against.

    NullReferenceException: Object reference not set to an instance of an object
    AC.PlayerInteraction.CheckForHotspots () (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:158)
    AC.PlayerInteraction.ContextSensitiveClick () (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:387)
    AC.PlayerInteraction.UpdateInteraction () (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:99)
    AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:274)

    If I then reimport the GameEngine prefab in AC/prefabs/automatic/, everything is fine again 
    :-?
  • Very odd.  Check that your GameEngine prefab has the new MultiSceneChecker script attached to it.

    In-between amending your player and pressing play, is it still tagged as Player and listed in your Settings Manager as the default prefab?
  • I went to check it it out, but I couldn't find any change before and after amending the player settings - the prefab is tagged as Player, it's still set as the player char in the Settings Manager, the GameEngine prefab has the MultiSceneChecker (in the scene as well), and re-importing it doesn't appear to change anything about the prefab. It's quite baffling.

    I checked if it only happened with changes to the player component, but it also happens if I for instance change the mass of the rigidbody or the size of the circle collider. Same in all the scenes.

    I'm trying to think if I did anything, but the only thing I can think of is that I didn't update all the preference files, you know, tag manager, build settings etc. I usually never do, because then they overwrite my custom inputs and things like that, but I don't know, maybe one of those had something important?
  • I'm getting an error when moving between scenes in the latest AC/Unity 5.2.1. The screen goes black but it doesn't crash. Any idea what is going on? The only thing I've been working on lately are translations. This is the error message:

    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[MoveableData] (System.String pXmlizedString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:312)
    AC.Serializer.DeserializeObject[MoveableData] (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:192)
    AC.Serializer.LoadScriptData[MoveableData] (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:613)
    AC.RememberMoveable.LoadData (System.String stringData) (at Assets/AdventureCreator/Scripts/Save system/RememberMoveable.cs:105)
    AC.ConstantID.LoadData (System.String stringData, Boolean restoringSaveFile) (at Assets/AdventureCreator/Scripts/Save system/ConstantID.cs:71)
    AC.LevelStorage.ReturnCurrentLevelData (Boolean restoringSaveFile) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:91)
    AC.SceneSettings.OnStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:95)
    AC.MultiSceneChecker.Start () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:48)



  • I'm also getting these errors:

    InvalidOperationException: <HotspotData xmlns=''> was not expected

    Seems to occur randomly when going from one scene to the next.
  • @hedgefield: I shouldn't think that'd make a difference, but make a backup and try it!
  • @machineboy: What platform are you building to, does it occur in the Editor too, and have you switched platform recently?
  • @ChrisIceBox: Occurs on both IOS and in editor, haven't switched platform. Tried an older backed up project with an earlier version of AC and no problems there, so seems to have been introduced with the latest/later version of AC.
    It appears to happen when going from one scene to a previously visited scene.
  • OK.  I'll let you know if I need more info to recreate it.
  • Can this be related to the added Auto-add save components to GameObjects feature? I tried deleting a Remember Movable script that was auto-added to an object, and that particular scene is working again.
  • I think it's more about the save scripts in general on iOS.  Try changing the save method from XML to Json - you can do this by opening up SaveSystem.cs and inserting the following at the top of the GetSaveMethod() function (around line 361):

    return SaveMethod.Json;
  • I can't seem to reproduce the error after I went over and deleted superfluous scripts, but if it occurs again I'll try to switch to Json, thanks for the hint!
  • Superfuous as in non-AC scripts?
  • edited January 2016
    No, I mean scripts that were auto-added when using Auto-add save components to GameObjects, especially Remember Movable that really weren't needed.

    EDIT: I just tried an iOS build, and it still crashed. I changed to json in SaveSystem.cs and after a recompile it appears to be working. I'll test some more.
  • It could be down to your device's software, or your iOS build settings - mine works when Api Compatibility Level is .Net 2.0 Subset, and Scripting Backend is Mono2X.

    As Json seems the safer option, I'd ideally like to make it the new default - but it may give grief to those who already have save games/data that won't be compatible.
  • edited January 2016
    I'm still getting crashes on iOS.

    Settings:
    Api Compatibility Level is .Net 2.0 Subset, and Scripting Backend is Mono2X.
    adjusted the SaveSystem.cs to json.
    Getting a EXC_BAD_ACCESS hard crash when loading a saved game on the iPad air 2.

    If I set the backend to IL2CPP and SaveSystem.cs to XML I get the same error as before, a visited scene won't load properly:






    InvalidOperationException: <VisibilityData xmlns=''> was not expected

      at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap) [0x00000] in <filename unknown>:0 

      at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () [0x00000] in <filename unknown>:0 

      at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in <filename unknown>:0 

      at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0 

      at System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream) [0x00000] in <filename unknown>:0 

      at AC.Serializer.DeserializeObjectXML[T] (System.String pXmlizedString) [0x00000] in <filename unknown>:0 

      at AC.Serializer.DeserializeObject[T] (System.String dataString) [0x00000] in <filename unknown>:0 

      at AC.Serializer.LoadScriptData[T] (System.String dataString) [0x00000] in <filename unknown>:0 

      at AC.RememberMoveable.LoadData (System.String stringData) [0x00000] in <filename unknown>:0 

      at AC.ConstantID.LoadData (System.String stringData, Boolean restoringSaveFile) [0x00000] in <filename unknown>:0 

      at AC.LevelStorage.ReturnCurrentLevelData (Boolean restoringSaveFile) [0x00000] in <filename unknown>:0 

      at AC.SceneSettings.OnStart () [0x00000] in <filename unknown>:0 

      at AC.MultiSceneChecker.Start () [0x00000] in <filename unknown>:0 

    Rethrow as InvalidOperationException: There is an error in XML document.

      at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in <filename unknown>:0 

      at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0 

      at System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream) [0x00000] in <filename unknown>:0 

      at AC.Serializer.DeserializeObjectXML[T] (System.String pXmlizedString) [0x00000] in <filename unknown>:0 

      at AC.Serializer.DeserializeObject[T] (System.String dataString) [0x00000] in <filename unknown>:0 

      at AC.Serializer.LoadScriptData[T] (System.String dataString) [0x00000] in <filename unknown>:0 

      at AC.RememberMoveable.LoadData (System.String stringData) [0x00000] in <filename unknown>:0 

      at AC.ConstantID.LoadData (System.String stringData, Boolean restoringSaveFile) [0x00000] in <filename unknown>:0 

      at AC.LevelStorage.ReturnCurrentLevelData (Boolean restoringSaveFile) [0x00000] in <filename unknown>:0 

      at AC.SceneSettings.OnStart () [0x00000] in <filename unknown>:0 

      at AC.MultiSceneChecker.Start () [0x00000] in <filename unknown>:0 

     

    (Filename: currently not available on il2cpp Line: -1)


  • Previously-saved save games won't work if you switch to Json - that's why the changeover wasn't automatic.
  • edited January 2016
    It appears that json (.savj) save files are more or less empty, like this:

    |||ROOMDELIMITER|

    while xml (savx) files are full of information (like they should).

    I'm also noticing that none of the remember visibility scripts are working now, testing in the editor so far.
  • It seems that things are working better in Unity 5.3.1f, saving and loading appear to work on my IOS project.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.