Hey Chris,First of all happy new year! Hope you had great time during new years and Christmas.
So I was trying to save custom scene data, and I've created my own script for that using your tutorial. But it doesn't seem to be working for some reason. It's attached to a gameobject that has Image component on it. The way that games are saved in my game is through checkpoints, so it just autosaves over the last autosave using this line of code:
SaveSystem.SaveAutoSave();
and I load with a button that loads last saved game through action list. Here is the script:
Script
What am I doing wrong? Thanks in advance.
Comments
Also, how does it behave when handled via the Save/Load menus? You can temporarily assign the Default_MenuManager asset in the Menu Manager to bring them back if your own game doesn't use them.
Unity version: 2017.3.0f3
And I'm working on the PC all the time. I've tried with the default saving/loading menus but it doesn't work either. I should mention that remember hotspot, animation, transform and scripts like that work in both autosave and default saving/loading menus.
The next step will be to insert some Debug.Log statements into AC's code to try to see why it's not picking it up.
The various Remember components are gathered in the PopulateScriptData method inside the LevelStorage script - around line 445. Just inside the foreach loop, paste in the following:
Debug.Log ("Processing: " + _script.name + " on object: " + _script.gameObject.name + ", subScene: " + subScene);
What does that output when you save in the scene in question?
Output:
and for 3 more objects in the scene that have Remember scripts on them, but the objects that have my remember scripts on it are not appearing.
But I managed to find out what was causing the problem. The canvas that contained my images and texts that I was trying to save had ConstantID script on itself, because I was using it for a menu, and once you set your canvas as Linked Canvas in Menu properties it gets that script on itself. So after I assigned some other canvas to that menu and deleted the ConstantID script from the canvas that has my custom remember scripts, saving works for them as well. Thanks for the help Chris I'm glad we got to the end of it. By the way is this how it's supposed to work? If a parent object has ConstantID script on itself it's children objects can't use remember scripts? Hope it isn't because I want some of those buttons to be in the AC menu and to have remember scripts on as well.