playMaker

Author Topic: [Solved] Creating GlobalVariable gives "ArgumentOutOfRangeException"[SOLVED]  (Read 744 times)

PowerOffUser

  • Playmaker Newbie
  • *
  • Posts: 6
Whenever I try to create a global variable I get this error. Does anyone know a solution to that problem?

Code: [Select]
ArgumentOutOfRangeException: Index must be within the bounds of the List.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Collections.Generic.List`1[T].Insert (System.Int32 index, T item) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
HutongGames.PlayMakerEditor.ArrayUtility.Insert[T] (T[] array, System.Int32 index, T item) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/Include/ArrayUtility.cs:53)
HutongGames.PlayMakerEditor.FsmVariable.SetNewVariableCategory (HutongGames.PlayMaker.FsmVariables variables, System.String variableName, System.String category) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmVariable.cs:1323)
HutongGames.PlayMakerEditor.FsmVariable.AddVariable (HutongGames.PlayMaker.FsmVariables variables, HutongGames.PlayMaker.VariableType type, System.String name, System.Type objectType, HutongGames.PlayMaker.VariableType typeConstraint) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmVariable.cs:581)
HutongGames.PlayMakerEditor.ActionEditor.DoNewGlobalVariable (HutongGames.Editor.TextField textField) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/ActionEditor.cs:3113)
HutongGames.Editor.TextField.DoCommitEdit () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/HutongGames/Editor/TextField.cs:281)
HutongGames.Editor.TextField.CommitEdit () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/HutongGames/Editor/TextField.cs:223)
HutongGames.Editor.TextField.OnGUI (UnityEngine.GUILayoutOption[] options) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/HutongGames/Editor/TextField.cs:144)
HutongGames.PlayMakerEditor.NewVariableWindow.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/NewVariableWindow.cs:68)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353)
UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:138)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
UnityEngine.UIElements.EventDispatchUtilities.PropagateToIMGUIContainer (UnityEngine.UIElements.VisualElement root, UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/Events/IEventDispatchingStrategy.cs:119)
UnityEngine.UIElements.EventDispatchUtilities.PropagateToIMGUIContainer (UnityEngine.UIElements.VisualElement root, UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/Events/IEventDispatchingStrategy.cs:134)
UnityEngine.UIElements.KeyboardEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/KeyboardEventDispatchingStrategy.cs:39)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
« Last Edit: May 04, 2020, 03:31:20 AM by PowerOffUser »

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Creating GlobalVariable gives "ArgumentOutOfRangeException"
« Reply #1 on: May 01, 2020, 09:19:41 AM »
have you try to go to Playmaker>Editor Windows>Global Variables
and try to make the variable from there?

PowerOffUser

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Creating GlobalVariable gives "ArgumentOutOfRangeException"
« Reply #2 on: May 01, 2020, 10:10:44 AM »
Yea, that worked. Thank you!