Search Unity

Question Visual Scripting will not output anything from Event System nodes

Discussion in 'Visual Scripting' started by GuyStreamsStuff, May 11, 2022.

  1. GuyStreamsStuff

    GuyStreamsStuff

    Joined:
    Dec 22, 2017
    Posts:
    27
    Hello peeps. I started a new project, downloaded the new input system, regenerated nodes, checked the input system debug to see if it was picking up my inputs, and I don't seem to get it to register within this simple script graph, or any other actually.

    Any suggestions? Here's the graph:
    upload_2022-5-11_9-25-42.png
     
  2. Starpaq2

    Starpaq2

    Joined:
    Mar 14, 2013
    Posts:
    77
    Try these 2 options:

    • attach a "player input" component to the same shared game object as the script machine. Within the player input component assign the "input action" asset to the component. That way it can be referenced in scene.

    • I find it easier to assign the object that has the player input component to a scene variable. This way you can assign the variable to input of the "on input system..." nodes.

    Beyond this it may be a discrepancy with the button detection options that have been chosen in the input asset.
     
  3. GuyStreamsStuff

    GuyStreamsStuff

    Joined:
    Dec 22, 2017
    Posts:
    27
    Player input component and asset were already attached, I tired setting it as a scene variable as well but it doesn't change anything. I verified input asset and all seems in order. The Input Debugger detects my inputs with no issues.

    upload_2022-5-11_14-21-5.png
     
  4. Starpaq2

    Starpaq2

    Joined:
    Mar 14, 2013
    Posts:
    77
    I was not able to determine any other potential solutions with the setup. Were you able to find the root cause?
     
  5. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Your graph and setup look fine.

    - Have you changed event values while in play mode? This node won't update if you change settings after starting the game.
    - Is the new Input system set to be used in you player. upload_2022-5-12_12-58-56.png
    - In my tests, I'm always using the Any on my player input, it could be an issue with the Default scheme? upload_2022-5-12_13-14-42.png
     
  6. KrzysztofX10

    KrzysztofX10

    Joined:
    Aug 12, 2017
    Posts:
    9
    I'm having the same issue, sorry for not being able to provide an answer.
    ericb_unity - I've done all of this and it did not help.
    I'm using Unity 2021.3.8f1. The project in which I'm having this problem is just a very simple project based on an online visual scripting course I'm following so I'd be happy to send over my project folder if that would help?

    EDIT: I found the cause. In order for the new input system to work you also have to click on your control scheme, click "Edit Control Scheme..." and add all the input devices you want to use in this control scheme, otherwise it doesn't work. After I did this the problem was solved for me.
     
    Last edited: Aug 23, 2022