Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Visual Scripting - Weird behaviour with the input system in UVS

Discussion in 'Authoring Dev Blitz Day 2023' started by Marou1, Jan 26, 2023.

  1. Marou1


    Dec 13, 2021

    I am experiencing the recurrent behaviour described below. I'd like to know if this is actually a bug or I am missing something.

    Let's say you have a script A with this:

    If this script A is attached to 2 objects and they are both enabled:
    => Pressing the key will trigger an action as expected in both occurrences of the script A.(The 2 objects will perform the expected action).

    If you disable the first object:
    => Pressing the key will not trigger anything even in the script attached to the second object that is enabled. It's like the input system is disabled in all occurrences of that script A.
    If you have a different script B that is attached to that second object, the input will work fine in the script B, but not in the script A.

    This means that the input system is working everywhere else but not in the occurrences of the script A.
    If you have 10 objects with the script A, you disable one of them, the input system will stop responding for the in script A of the 9 other objects.

    I am using a workaround:
    I created an empty game object with the script A. And each time I disable one object that has the script A, I have to disable the empty game object then enable it to make the input system work again in all occurrences of the script A.

    Is this just a bug or am I missing something?

  2. theor-unity


    Unity Technologies

    Feb 26, 2016
    Looks like a bug or at least something that should be documented ! we'll have a look.

    Thank you for the report !
    rc82 likes this.