Forum rules - please read before posting.

Losing/Missing Variables

edited April 2017 in Technical Q&A
Hi all,

I'm just checking if anyone has encountered a similar issue (after searching I couldn't find anything however worth checking). I noticed that 4 of my 5 local variables had become 'corrupt' and they were all changed to blank Bool's, I had to open a previous version of a backup of my project to identify what the variables were to restore them.

This image shows the 4 out of the 5 variables that were lost/corrupted somehow.

Here shows the variables as they were (in the old backup project which I've since transferred back to the new project relatively quickly.

Thankfully I had a backup and it only happened to 4no variables however I am concerned that something similar could happen again and potentially be unrecoverable? Has anyone else had a similar issue - any known cause for this at all? Thanks again in advance for the help.


  • Umm... Never seen or heard of that issue before, but I once had corrupt data too (some UI in the menu manager). But it only happened because I updated to the newest AC from a very, very old AC version. Have you done anything similar? Also, what AC and Unity versions are you using right now?
  • edited April 2017

    Thanks again for the quick response. I'm using the latest versions of Unity and AC, only recently updated both which might explain the issue since you say that you experienced something similar (with corrupt data) when you updated however unlike yours mine were only minor updates (so I updated Unity from 5.5.x to 5.6.x and then AC was only 1.56x to the latest 1.56x).

    The one thing that I would like to know, and potentially could cause the issue, is with regards to opening 2 scenes at the same time. I do this at times to check what I did in a previous scene so I can replicate in the new scene however the AC Manager window seems to only show the info for one scene at a time i.e. they only show the Scene settings for Scene A and Variables for Scene A etc even if you have both Scene A and B open at the same time. Could having two scenes open at the same time cause any potential issues and cause the issue that I've had with the 'corrupted' variables? Although I've done this a lot ever scene Unity introduced the option to open two scenes simultaneously and I never had an issue before?
  • edited April 2017
    Well, I've noticed a lot of corrupt asset reports since people started upgrading to Unity 5.6 so it may have have to do with the upgrade (Maybe it's plain bad luck or there's been some change that affects some serialized/saved data from old projects).

    Regarding opening multiple scenes, I must admit that I don't do that much, so I'm unsure. I may have to do some testing if I have the time during the week. Anyway,I assume peeking into the AC editors for both scenes used to work just fine in Unity 5.5?
  • Alverik,

    Yeah opening two scenes at the same time always previously worked fine and to be honest I've used it since in 5.6 and it's worked which likely indicates that this isn't the issue however it was the only thing I could think of (because of the aforementioned issue with the AC window only being able to show one scene's info it just made me think that this could potentially be confusing for AC if you're editing Scene B however the AC window is only showing Scene A's info)?

    I might start a new project and do a test with it to see if I can replicate the issue by simply opening two scenes at a time (because although I open two at the same time a lot I must admit that it is literally for 1-2 minutes max to quickly check something and replicate.
  • edited May 2017
    Please do!  Though the source of this issue is still unclear, it will need to be addressed if it's down to AC.  I will do my own testing as well.

    As this hasn't been reported elsewhere, it could well be down to you having multiple scenes open at once - which isn't something commonly done with AC AFAIK.  Though AC should only ever refer to the "active scene" in your Managers, it may be that an update in Unity 5.6 is causing this - try to make use of the latest Unity patch.
  • @ChrisIceBox

    Apologies, I haven't done this yet. I'll try to test and report back what I find!
  • edited May 2017
    Hi everyone,
    I think I have a problem linked to this issue. I'm using Unity 5.3.1f + AC 1.56e, but when I use "Variable" and Check or Set, I can see all correct for the global variables, while I can't select the local variables, as if there isn't the box.

    Here's the link to the problem:

    On the top the local (where I can't select the local variables) and in the bottom the correct way for the globals.

    Thank you

  • edited May 2017
    @ciro_camera Are you using Actionlists or Actionlists assets? I don't think local variables are selectable from Actionlist Assets (the ones you can keep in the project folders). To use local variables you should use an in-scene actionlist.

    PS: I just saw your other post. Because you just updated AC, you should probably make sure you aren't getting any compile errors (shown as red text in the console tab). Any red warning will prevent the editor from working (even if the warnings are not caused by AC, so we should verify this).
  • If no LocalVariables component can be found in the scene, the list of Variables won't show.  I will add a help box to clarify when this occurs.

    Check that there is a GameEngine object in your scene, and that it has a LocalVariables component attached to it.
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.