Forum rules - please read before posting.

Possible bug - Comparing global variables

edited July 2014 in Technical Q&A
Hi Chris, with the new update 1.36 some cutscene where i check some variables aren't working anymore.
In this Cutscene I check the value of a global variable with the value of another global variable. The first check is ok but i found the second check become empty... 
Example:
Source: Global
Variable: GlobalVarExample
Compare with: Global
Statement: Equal to ..... (here the aren't buttons anymore... they disappear...)

If i change the Compare with in Local variable, the button reappear and I can select a Local variable near the Statement "equal to".
If I change again the "Compare with" in Global variable, the button still stay but i can select only Local variable...

I think it's a bug because before the update it was working...
Tx and bye!

PS: looking in the Action List Editor, I have some actions become... like in this pic! O_O!
image

And after that some errors I cannot understand:

NullReferenceException: Object reference not set to an instance of an object
ActionVarCheck.ShowVarGUI (System.Collections.Generic.List`1 vars, Int32 ID, Boolean changeID) (at Assets/AdventureCreator/Scripts/Actions/ActionVarCheck.cs:405)
ActionVarCheck.ShowGUI (System.Collections.Generic.List`1 parameters) (at Assets/AdventureCreator/Scripts/Actions/ActionVarCheck.cs:282)
AC.ActionListEditor.DrawSharedElements () (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditor.cs:153)
CutsceneEditor.OnInspectorGUI () (at Assets/AdventureCreator/Scripts/Logic/Editor/CutsceneEditor.cs:36)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/Inspector/InspectorWindow.cs:850)
UnityEditor.DockArea:OnGUI()

BTW, you can recreate it with the basement demo. Add a new cutscene, compare a global variable with another global variable and you'll see it.

Comments

  • It's a bug all right, and a critical one.  I will have to fix this ASAP, thanks for letting me know.
  • This will be fixed in 1.37, but because it's ETA is a little up in the air, here's how to fix it in the meantime:

    ActionVarCheck.cs: (line 405)

    change:
    compareVariableID = ShowVarSelectorGUI (localVariables.localVarscompareVariableIDfalse);

    to:
    compareVariableID = ShowVarSelectorGUI (variablesManager.varscompareVariableIDfalse);
  • Hey thank so much @ChrisIceBox!
    I really appreciate your quick fix! Really! 
    :)>-
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.