GetEvent(T) doesn’t work OnClick()

FlowCanvas Forums Support GetEvent(T) doesn’t work OnClick()

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3425
    dryrel
    Participant

    Hi!

    I created a flow script for the options.

    And I’m trying to set this value via Button.

    However, GetEvent(T) doesn’t work. GetEvent works but in this way, I cannot change the value of the options.

    What should I do?

    Thanks in advance

    #3426
    dryrel
    Participant

    Please check the attachments

    Attachments:
    You must be logged in to view attached files.
    #3431
    Gavalakis
    Keymaster

    Hello again,

    The Unity events in the inspector like the button Click events only work with only one parameter and this parameter is reserved for the string name of the event of the flowscript, thus, unfortunately, calling T events is not possible with Unity events directly.

    Having said that, I could try to make it possible to pass parameters in parenthesis like you tried to do in the screenshot for the sake of making it able to call events with parameters this way.

    Let me know.

    Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #3437
    dryrel
    Participant

    Hello again, The Unity events in the inspector like the button Click events only work with only one parameter and this parameter is reserved for the string name of the event of the flowscript, thus, unfortunately, calling T events is not possible with Unity events directly. Having said that, I could try to make it possible to pass parameters in parenthesis like you tried to do in the screenshot for the sake of making it able to call events with parameters this way. Let me know. Thank you.

    Hello!

    It would be great if you could do this.

    But right now, how do you think I should solve what I want to do? I want to change those parameters via button.

    Button (Prefab):

    OptionTitle [<] OptionValue [>]

    Each time the next [>] or [<] back button is pressed, the number of indexes changes and the text is set in the array.

    However, it currently has no function. Since GetEvent(T) is not passed with OnClick(), how should I proceed?

    #3438
    dryrel
    Participant

    Hey! Can you give me an advice? What should I do?

    #3441
    Gavalakis
    Keymaster

    Hello and sorry for the late reply.

    I suggest that you simply:

    1. Drag and Drop the Button object into the flowscript canvas.
    2. From the menu select “Button/Event/onClick (Auto Subscribe).
    3. Then use the node that will be created to call nodes or send events as normal in flowcanvas, like in your example use the SendEvent(bool” node (or simply directly do what you have to using the OnClick event node output) 🙂

    Let me know if this works for you.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.