Hi, making my first FSM to load levels and I somehow
managed to create two variables with the same name but different types. I think I was actually trying to change the variable type of the first instance and the dialog indicated that the variable was already in use. In any event I ended up with 2 of them and I am unable to delete either one now (edit: was able to reproduce the problem).
@this point I don't see anyway around this other then deleting the FSM and starting over?
To reproduce this problem - Warning please do this in a *test* FSM
1) Create a new FSM on a gameobject
2) Add a variable called levelToLoad as string
3) Add a ONGUI button, set button text to use variable levelToLoad
4) Go back to variables, change variable type to GameObject
5) When prompted "This variable is used! Are you sure you want to change it's type? choose Yes
6) When prompted "This variable is used! Are you sure you want to delete it? choose No
You now have duplicate variables you cannot get rid of.
iByte
Error:
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.Int32].Add (System.String key, Int32 value)
HutongGames.PlayMakerEditor.VariableManager.UpdateUseCount ()
HutongGames.PlayMakerEditor.VariableManager.CheckDeleteVariable (System.String title, System.String warning, HutongGames.PlayMakerEditor.FsmVariable fsmVariable)
HutongGames.PlayMakerEditor.VariableManager.DeleteVariable (HutongGames.PlayMakerEditor.FsmVariable fsmVariable, Boolean undo, Boolean checkDialog)
HutongGames.PlayMakerEditor.VariableManager.DoVariableTable ()
HutongGames.PlayMakerEditor.VariableManager.OnGUI ()
HutongGames.PlayMakerEditor.InspectorPanel.OnGUI (Rect area)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI ()
FsmEditorWindow.OnGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:124)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)