Search Unity

Buttons Not Working

Discussion in 'Visual Scripting' started by KostiaLiakhov, May 27, 2021.

  1. KostiaLiakhov

    KostiaLiakhov

    Joined:
    Mar 13, 2021
    Posts:
    13
    Hi friends,

    After updating to 2021 version of Unity, I'm having an issue with UI buttons.
    No matter what I do, it results in errors. Clicking the button doesn't do anything.

    MissingMethodException: UnityEngine.UI.InputField/SubmitEvent UnityEngine.UI.InputField.get_onEndEdit()
    Bolt.UnityMessageListener.Start () (at <243840e3f5ca402e9b7902a417235769>:0)

    Unity version 2021.1.7f1
    Bolt 1.4.13

    Any ideas what can be a problem here?
    Much appreciate your help!
     

    Attached Files:

  2. Notso

    Notso

    Joined:
    Oct 25, 2015
    Posts:
    44
    You are not telling it what to do after the click, also i believe you need to get the button component....this is one of my button setups on the transition
    upload_2021-5-27_16-9-47.png
     
  3. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,063
    No need to get a specific component. Bolt retroactively retrieves the right component from a GameObject input. As you can see, On Button Click event input is of type GameObject.

    As for the issue in the OP. Does the object that has Script Machine on it also has a button component? And if you're using the new input system, have you also resolved the EventSystem dependencies for UI to work? That can be done

    EDIT: Wait! Bolt 1.4.13 is not supported on Unity 2021. You should be using the new Visual Scripting from the package manager. It ships with Unity 2021 and can be opened from Window/Unity Visual Scripting. Upgrade from 1.4 to Unity VS 1.5.2 likely won't work, you can enable preview package support in Project Settings I think and Update Unity VS to 1.6 or higher which has a partially working upgrade process from Bolt to Unity VS.
     
    Last edited: May 27, 2021
    GregMcM likes this.