Hi All,
I'm new to Playmaker so it is possible that this error is caused by a logic in the Playmaker actions that I don't understand yet. It also might be a bug, but if it's not please try to explain what causes it.
I have 2 simple FSM's on a UI Image.
FSM 1:
Start -> UI On Pointer Down Event (FINISHED) -> Empty (FINISHED)
(The state called Empty has nothing in it and it is looped back to the UI On Pointer Down Event)
FSM 2:
Start -> UI On Pointer Up Event (FINISHED) -> Wait (FINISHED)
(The state called Wait contains a Wait action with Time: 1, and Finish Event: FINISHED)
When I press the gameobject, on the POINTER UP event, it shows an error:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEngine.EventSystems.EventTrigger.Execute (UnityEngine.EventSystems.EventTriggerType id, UnityEngine.EventSystems.BaseEventData eventData) (at C:/Program Files/Unity Editor/2019.3.0f3/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventTrigger.cs:212)
UnityEngine.EventSystems.EventTrigger.OnPointerUp (UnityEngine.EventSystems.PointerEventData eventData) (at C:/Program Files/Unity Editor/2019.3.0f3/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventTrigger.cs:263)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerUpHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/Program Files/Unity Editor/2019.3.0f3/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:43)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at C:/Program Files/Unity Editor/2019.3.0f3/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity Editor/2019.3.0f3/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
Here's what I have experienced so far:
- If I turn off any one of the FSM's and leave only one, the remaining one works fine.
- If I disable the Wait action in the Wait state, it works fine.
- If I have empty states after both of the UI event listeners, but one of them is not looped back, then it also gives the same error.
Do you know what might cause this?
Thanks!