Forum rules - please read before posting.

1.47 Bug? All variables reset to false/0 in play mode

edited August 2015 in Engine development
While troubleshooting a problem with the Dialogue System plugin and its use of variables from AC, I think I found a problem: I've ticked "show realtime values", and whenever I press play on a scene, all the integers turn to 0, all the bools turn to false, and all the strings become nil. Only if I then set a new value for a variable via a cutscene action do they function correctly.

Like I said I first thought this was a Dialogue System problem because conversations that used to work didn't start anymore, but I'm also getting nullrefs on a GUI which displays the value of an integer. I have to test that further to see if it's the same problem (though I don't get a nullref in the one scene where I manually set the variable value in a cutscene), but at least from what the realtime values are telling me something is going on...

[Edit] Could this have something to do with the new variable presets feature?

[Edit2] Looks like that nullref isn't related to this problem.

Comments

  • A big problem, but not one I can recreate.  Have you got any presets defined?
  • No, haven't got any presets defined. Could anything else be influencing the Variables Manager? I'll test this out in other projects too, maybe some legacy thing interfering, an old file that's not used anymore, idk.
  • Chris - could there be some kind of serialization issue with the LocalVariables component in this scene?

    Tim - Does your scene perhaps have two LocalVariables components? What version of Unity are you using? I'd like to test this out in case it's something the level designers in my own project need to be aware of.
  • Is this affecting Global or Local variables?  @PixelCrushers, the LocalVariables shouldn't affect it if it's Global that's affected.

    I don't know the extent to which DS affects AC's variables, so without being able to recreate this myself means I'm not sure if this is an AC issue or a DS one.
  • edited August 2015
    It's both global and local variables that are affected. There is only one LocalVariables component on the GameEngine prefab if that's what you meant.

    I tried the same trick in another AC 1.47 project which doesn't have DS in it, and there no values were modified when pressing Play. So either it's DS or it's a legacy thing in this project that has been upgraded through many versions of AC (although it's not thát much older than the other project so probably not likely).
  • Sorry about the delayed reply. I just turned on email notifications, so it shouldn't happen again.

    I haven't been able to reproduce this. If you start with a new, empty project and import AC and DS, does the problem still occur?

    If the problem still occurs, please let me know the versions of Unity, AC, and DS.
  • Ok, I tried making a new project, going through the AC and DS wizards to the point where I can run the game without errors even though there's nothing really there yet, and I made a global variable, set to true, and it stays true when the game starts. So I have to conclude it's something specific to my project that's causing this strange behaviour. I've been thinking of rebuilding it from scratch to get a fresh project directory going forward anyway, so maybe this is another argument for that.
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.
Do NOT follow this link or you will be banned from the site!