At the beginning of the game I have a title screen where players can select their profile. When they click on a continue button I want to load only variables, so the game knows their playername, progress, etc. Unfortunately this always triggers the scene to reload or rather trigger the designated "on load" cutscene.
I saw that you fixed some issues with selective loading in 1.60 but that's also the version I'm currently working with. Is this a bug, do you need more information, does anyone know an existing workaound for this?
I'll try to set-up a different "on load" cutscene for, one that may be able to circumvent the issue, but we definitively narrowed it down to the action list element that selective loads only variables from the current autosave.
Comments
When a scene is loaded due to restoring game data, the OnLoad will always trigger - it's not an option to selectively disable. It's possible that could be altered, but if I'm not sure why you'd create an OnLoad cutscene if you don't want it to run. Can you elaborate on the exact needs and situation here?
Scene 0 - Title Scene
"OnLoad" calls TitleMenu
The TitleMenu is for selecting/creating profiles and quitting only. Once a profile is created or selected, a button labeled "continue" appears that is supposed to switch from this TitleMenu to the MainMenu.
"Continue" Button
Was supposed to only load variables after an existing profile is selected. It's not switching scenes, only turning off one menu and turning on another. I only want the variables https://imgur.com/iWPXVkZ and then switch the menu.
Instead what happens is the scene I'm currently in, the Title Scene, appears to be reloaded as well by this action, ... which triggers my OnLoad, and never switches to the next menu.
I put some blockers https://imgur.com/Byv9YMr in my ActionList to see what happens and it looks like AC never runs the action after the selective load.
Solution: I figured out that selecting a profile automatically loads PlayPrefs. By saving the progression-relevant variables in OptionsData I actually don't have to load anything in this scene anymore. This also allows me to use variable presets more efficiently, since it's possible to ignore variables stored in PlayerPrefs.
Sidenote: https://imgur.com/ZMY1sOj appears to work more reliable than https://imgur.com/AdgeZV6 but I haven't figured out why.
Edit: I put the links in again, because I can't see the images here.
Hi, I would like to load only variables from a save, I found this custom script @ChrisIceBox wrote, but the link to pasteall.org seems broken, can you resend this script please?
Chris:"To load only variables from a save file, you need a custom script. Something like this: http://pasteall.org/1068777/csharp".
Thanks!
I believe this was it:
Thanks @ChrisIceBox !