playMaker

Author Topic: uGui Drop Down Add Option Problem (Video) [SOLVED]  (Read 224 times)

drown

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
uGui Drop Down Add Option Problem (Video) [SOLVED]
« on: September 06, 2017, 08:39:36 AM »
Unity Version : Unity 2017.1.0f3 (Personal)
Playmaker version : 1.8.5

I am trying to let the user enter a new option for a drop down field. He enters his option via Inputfield, the submitted value is then passed through a Regex action, removing all letters from the number, then a string is built using the same format as my dropdown actions. After this, the string is added to the dropdown field via "uGui Add Drop Down Option" action.

Once the "Add Option" action is active, I get this error :

Code: [Select]
InvalidCastException: Cannot cast from source type to destination type.
HutongGames.PlayMaker.Actions.uGuiDropDownAddOptions.DoAddOptions () (at Assets/PlayMaker Custom Actions/uGui/uGuiDropDownAddOptions.cs:71)
HutongGames.PlayMaker.Actions.uGuiDropDownAddOptions.OnEnter () (at Assets/PlayMaker Custom Actions/uGui/uGuiDropDownAddOptions.cs:48)
HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:199)
HutongGames.PlayMaker.FsmState.OnEnter () (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2670)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2628)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2556)
HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2595)
HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2198)
HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2289)
HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/User/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2370)
HutongGames.PlayMaker.Actions.uGuiInputFieldOnSubmitEvent.DoOnEndEdit (System.String value) (at Assets/PlayMaker Custom Actions/uGui/uGuiInputFieldOnSubmitEvent.cs:69)
UnityEngine.Events.InvokableCall`1[System.String].Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:189)
UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:637)
UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:773)
UnityEngine.Events.UnityEvent`1[T0].Invoke (.T0 arg0) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_1.cs:53)
UnityEngine.UI.InputField.SendOnSubmit () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1582)
UnityEngine.UI.InputField.DeactivateInputField () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:2303)
UnityEngine.UI.InputField.OnUpdateSelected (UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1254)
UnityEngine.EventSystems.ExecuteEvents.Execute (IUpdateSelectedHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:99)
UnityEngine.EventSystems.ExecuteEvents.Execute[IUpdateSelectedHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update()

The variable type is correct in the action, it doesnt work even if I enter a random text in the action itself. I might have set up the uGui proxies wrong, but since every other uGui action works I have no clue what I should change. I made a short video to demonstrate this error in a different project (nearly no third party assets, just some transitions) :

https://www.youtube.com/watch?v=jGqJk8GonVQ

Thanks in advance
Alex
« Last Edit: September 12, 2017, 04:13:49 AM by drown »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: uGui Drop Down Add Option Problem (Video)
« Reply #1 on: September 07, 2017, 02:18:22 AM »
Hi,
 
 let me have a look at this. Please bump me on Monday if I haven't replied. Thanks :)

 Bye,

 Jean

drown

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
Re: uGui Drop Down Add Option Problem (Video)
« Reply #2 on: September 11, 2017, 02:35:29 AM »
Bump, hopefully this can be solved.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: uGui Drop Down Add Option Problem (Video)
« Reply #3 on: September 11, 2017, 10:59:09 PM »
Hi,

 Thanks for the bump, I need this. I am on it right now.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: uGui Drop Down Add Option Problem (Video)
« Reply #4 on: September 11, 2017, 11:55:50 PM »
Hi,

 ok, done, please re download the uGui package from the Ecosystem. the action is fixed.

 Bye,

 Jean

drown

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
Re: uGui Drop Down Add Option Problem (Video) [SOLVED]
« Reply #5 on: September 12, 2017, 04:14:20 AM »
I can confirm that it is fixed ! Thank you for the amazing support & efforts !  :) 8)