Forum rules - please read before posting.

Save system - Component variables changed when loading a save

I found an issue when testing my game I loaded a save and saw that screen was showing assets that should not be visible until certain contentions/variables are activated. not all variables are set it seems but a number of them are.

https://imgur.com/a/7tldhYB - before saving and loading

https://imgur.com/a/VmpBB7z - After saving and loading

Comments

  • edited April 2020

    In what versions of AC and Unity?

    The screens show the result of the issue, but not the cause. Is it that assets were visible before you loaded - and didn't get hidden upon loading an earlier save - or are they invisible before and becoming visible afterwards?

    How are you intending for such assets to become visible upon loading? By use of Remember components - or initialisation in an OnLoad cutscene based on component variables? You'll need to share more on your set up for it to be clear what's going on.

    If you haven't flagged up your scene objects for saving, you'll need to do so - this can be done via the "Auto-add save components to objects" button in the Settings Manager.

    Your title mention Component variables changing when loading a save. Typically, they're supposed to. The Remember Variables component, when attached, will store component variable values in save games. Are they changing to something unintended?

  • using an older version of unity and AC, unit 2018.2.4 and AC v1.68.4 (we plan to update everything to latest versions once we complete the demo and release it)

    I just double-checked how I have everything set up and in the onstart cutscene, I set the farmer character and packet on the table to be invisible and their hotspots to be disabled. I think that was why this issue was occurring as onstart doesn't have the Remember component.

  • Remember components need to be added to the GameObjects they're intended to affect - not a Cutscene that references them.

    See the tutorial videos, as well as the Manual's "Saving scene objects" for details on how the Remember system works.

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.