Forum rules - please read before posting.

Strange problem on a scene after load

Hi,
I'm becoming mad in resolving this strange issue on a scene and I don't know where the error is... maybe Chris can direct me in the right direction.

The problem appear after a Load game and all the variables don't get the right value of the saved game (remain the same value of the game before load it). And other strange thing, the first time I load, the camera switch to the default camera, even if I saved from another camera (with ID yep).

This happens only in a scene, the others works correctly.

Unity 4.7.0 and AC 1.49a (cannot update, I'm at 80% of the game and I can't test it from the begin):

NullReferenceException: Object reference not set to an instance of an object
AC.RememberMaterial.LoadData (System.String stringData) (at Assets/AdventureCreator/Scripts/Save system/RememberMaterial.cs:61)
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.SaveSystem.OnLevelWasLoaded () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:725)
AC.SaveSystem.LoadSaveGame (Int32 saveID) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:628)
AC.SaveSystem.LoadGame (Int32 elementSlot, Int32 saveID, Boolean useSaveID) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:503)
AC.MenuSavesList.ProcessClick (AC.Menu _menu, Int32 _slot, MouseState _mouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:549)
AC.PlayerMenus.CheckClick (AC.Menu _menu, AC.MenuElement _element, Int32 _slot, MouseState _mouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1489)
AC.PlayerMenus.CheckClicks (AC.Menu menu) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1240)
AC.PlayerMenus.UpdateAllMenus () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1403)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:246)

Thanks in advance!

Comments

  • edited January 2016
    Ok, I think I solved. I write the "solution" because maybe can happen to someone else.

    For the error, there was a game object with a missing mesh and the value 0 to materials. The remember materials script was attached, so I think this messed up all (save/load and variables! :-O).

    For the camera... this was a big fault of mine... I made this scene time ago and I forgot I make a trigger with "on exit" switch to camera. When I load from a saved game, it consider the player exit from that trigger so it switch to that camera. Wops! L-)


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.