Please help me understand the concept of using a Remember Animator component after a game Load.
I have a Sprites Unity animation of a picture hanging on a wall. It has 3 different clips:
1. Picture_UP (picture hanging on the wall); Layer Default State
2. Picture_FALLING (the picture falls to the ground)
3. Picture_DOWN (picture is on the ground)
If I trigger my hotspot, the actionlist plays the clips sequentially and the picture falls off the wall and onto the ground. Perfect. If I exit the scene then enter it again the Remember Animator works (the picture remains on the ground where it was when I left the scene).
However, if I Save, Quit, and then Load the game, the picture appears as on the wall (the Layer Default State) after the scene is loaded.
Why doesn't the Remember Animator work on the Load?
The only solution I've been able to devise is record a global string variable "PictureLocation' and set it to "down" at the end of the actionlist. Then I use an On Load cutscene and check the variable. If it's "down" then it triggers an Object:Animate:Clip="Picture_Down". This method is becoming increasingly tedious as more of my animations have several clips.
Is there a better way to approach this?
Comments
UnityEngine.Debug:Log(Object)
AC.RememberAnimator:LoadData(String) (at Assets/AdventureCreator/Scripts/Save system/RememberAnimator.cs:58)
AC.ConstantID:LoadData(String, Boolean) (at Assets/AdventureCreator/Scripts/Save system/ConstantID.cs:74)
AC.LevelStorage:SendDataToScene(SingleLevelData, Boolean, SubScene) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:140)
AC.LevelStorage:ReturnCurrentLevelData(Boolean) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:77)
AC.SceneSettings:OnStart() (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:129)
AC.MultiSceneChecker:Start() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:72)
UnityEngine.Debug:Log(Object)
AC.RememberAnimator:LoadData(String) (at Assets/AdventureCreator/Scripts/Save system/RememberAnimator.cs:58)
AC.ConstantID:LoadData(String, Boolean) (at Assets/AdventureCreator/Scripts/Save system/ConstantID.cs:74)
AC.LevelStorage:SendDataToScene(SingleLevelData, Boolean, SubScene) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:140)
AC.LevelStorage:ReturnCurrentLevelData(Boolean) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:77)
AC.SaveSystem:_OnLevelWasLoaded() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:583)
AC.SaveSystem:ReceiveDataToLoad(SaveFile, String) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:485)
AC.SaveFileHandler_SystemFile:Load(SaveFile, Boolean) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:125)
AC.SaveSystem:LoadSaveGame(SaveFile) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:415)
AC.SaveSystem:LoadGame(Int32, Int32, Boolean) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:340)
AC.MenuSavesList:ProcessClick(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:711)
AC.PlayerMenus:CheckClick(Menu, MenuElement, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2286)
AC.PlayerMenus:CheckClicks(Menu) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1932)
AC.PlayerMenus:CheckForInput() (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2026)
AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:300)