Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Scene changing bug in 1.42

I'm having an issue after updating to 1.42 (and also from Unity 4.6.1 to 4.6.2f1) where changing one particular scene causes problems.

This problem is kind of strange though, since it only happens when I go through a (at least) two scene changes: when I change from scene A to scene B, then back from scene B to scene A, the normal "player start" marker and "on start" cutscene do not activate. Meaning, the player prefab remains in the same position he was in in the previous scene, and none of the actions in the "on start" cutscene are run.

I also get this error message:

InvalidCastException: Cannot cast from source type to destination type.
AC.Serializer.DeserializeRememberData[VisibilityData] (System.String pString) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:161)
AC.Serializer.LoadScriptData[VisibilityData] (System.String stringData) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:341)
AC.RememberVisibility.LoadData (System.String stringData) (at Assets/AdventureCreator/Scripts/Save system/RememberVisibility.cs:82)
AC.LevelStorage.ReturnCurrentLevelData () (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:64)
AC.SceneSettings.Start () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:64)


The strange thing is that this problem does not occur when going from scene B to scene A only. As in, if I press the start button to start the game mode (in the editor of course) in scene B, then when I change to scene A (in the same way I normally would if I started in scene A then went to scene B), everything runs perfectly. 

This also happens when coming from scene C (again, only when going from A to C first), so I'm thinking there might be some problem when scene A is first run.

Comments

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.
Do NOT follow this link or you will be banned from the site!