Unity New Input System MultiplayerEventSystem and InputSystemUIInputModule is commented out

Hi. I just installed the New Unity Input System. The PlayerInput and so on is working. I can already play multiplayer using my keyboard and controller. But when I added a UI for the players and searched some tutorials, I found out that the InputSystemUIInputModule script in the Inspector is blank. I can’t even search or use the MultiplayerEventSystem.
When I look on the script for both it says:
#if PACKAGE_DOCS_GENERATION || UNITY_INPUT_SYSTEM_ENABLE_UI
as I posted below.

What possible solution can I do? What does the if statement mean? Unity Input System is already enabled in my Player Settings. Should I choose “Both”?

Thanks in advance.

The graying out doesn’t necessarily have to mean much. Depends on whether VS realizes that those are defines are set.

Could you post a screenshot of that?

If the component is indeed not compiled, it would say “Missing script” in the inspector there. If the inspector for the component is blank, that sounds like a different issue.

5816497--616036--upload_2020-5-7_16-54-23.png

Here’s the screenshot in the Inspector.5816782--616081--unity input system2.PNG

I already fixed that problem. I just need to update my Unity to version 2019.3, but another problem comes up. This includes the with the UI again. Whether I point, click, and pressed a button this error pops out in my console:

MissingMethodException: UnityEngine.InputSystem.UI.InputSystemUIInputModule.OnRightClick Due to: Attempted to access a missing member.
System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[ ] providedArgs, System.Reflection.ParameterModifier[ ] modifiers, System.Globalization.CultureInfo culture, System.String[ ] namedParams) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable) (at <480508088aee40cab70818ff164a29d5>:0)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

How can I fix this?

@shaq145 were you able to fix this issue? I am running through the same problem

@shaq145 @javisarias

I had the same exception for SendMessage and the Input Action OnLook (instead of OnRightClick).

The following worked for me (when using SendMessage as the Input Notification)

  1. Enable “Generate C# Class” on the Controls Import Settings (Input Action Importer).
  2. On the target GameObject, have one MonoBehavior that can accept the SendMessage for the Action:
    public void OnLook(InputValue value)
    {
        //Debug.Log("OnLook " + value.Get<Vector2>());
    }
3 Likes

I had a similar issue here but it was due to my function name having the same name as the functions generated in ‘Player Input’ class. In my case I was using ‘OnPointerMove’ which clashed with the same function in the Player Input class (guessing SendMessage() doesn’t like this).

2 Likes

I encountered a same issue when PlayerInput and InputSystemUIInputModule exist on same Gameobejct. I attached the PlayerInput on other gameobject, and solved the issue.

2 Likes

I had the same error, until I switched my PlayerInput’s Behaviour to “Invoke C# Events”

1 Like

Thank you! this was the end of a ~2 hour search. Problem fixed. (Changed to playerinput.notificationBehavior = PlayerNotifications.InvokeUnityEvents)

We need a layerinput.notificationBehavior = PlayerNotifications.None option. I’m using polling so this would be perfect and cost less in performance.

Side note, if you make a InputActionAsset from json the InputSystemUIInputModule inspector will only display none for all action types. but if set from script at runtime it still works as expected. only confusing from a debugging standpoint.

well my error was too silly but I’m sharing my solution anyway… I wrote void OnFire(Input value){…} it is InputValue instead of just Input… At least I found it!! That’s the bad part of studying at 3am…