[BUG] Virtual Controls + Input System Integration

neubern

Member
Hello there,
The Virtual Controls are not working with Unity's new Input Systems.
Despite having installed the Input System Integration, it seems the Virtual Controls are still unaffected.

When creating an empty scene and following the Setup, Mobile controls don't work and I get the following Message:

Code:
Error: The character Nolan has no UnityInput component.
UnityEngine.Debug:LogError (object)
Opsive.Shared.Input.VirtualControls.VirtualControlsManager:OnAttachCharacter (UnityEngine.GameObject) (at Assets/Opsive/Shared/Input/VirtualControls/VirtualControlsManager.cs:72)
Opsive.Shared.Input.VirtualControls.VirtualControlsManager:Awake () (at Assets/Opsive/Shared/Input/VirtualControls/VirtualControlsManager.cs:42)
 

Justin

Administrator
Staff member
Unity's input system has its own touch controls so you do not need to use the virtual controls with it. The virtual controls use Unity's input manager.
 

neubern

Member
Well, the Virtual Controls of the newest Version of the Third Person Controller don't work in the old Input System either.
 

Justin

Administrator
Staff member
I just tested this and it worked. Make sure you have the input manager enabled instead of the input system and also have the UnityInput component.
 

neubern

Member
No, it doesn't.
Let me tell you Step-by-Step what I'm doing:

I open a new Unity Editor using the 3D Mobile Template. Editor Versions I use are BOTH 2020LTS and 2021.2.4f1. In Both it doesn't work.

Import the Third Person Controller to the Package.
Out of the Box the Demo already doesn't work with the Virtual Controls. I Manually enable them in Editor, and they don't work.

Then I create a new Scene. Add a Plane for the Character. Then Go through the Opsive Setup and setup successfully another Nolan in the scene with everything set right. But the Virtual Controls still don't work....

Then I import the Input System from Unity. Then I import the Opsive Integration for the Input System.
I go through all the Process of changing all the necessary components in Order for the integration to work...
But it's the same. The Keyboard Controls work, but the Virtual Controls do not, plus I get the Error Message posted above.


I went through Everything, different Editor Versions even. But the Virtual Controls are non responding.
 

Justin

Administrator
Staff member
Then I import the Input System from Unity. Then I import the Opsive Integration for the Input System.
Virtual controls do not work with the new input system. This is likely the reason why it's not working for you. Unity's new input system has its own touch controls so the built-in virtual controls are not necessary.
 

neubern

Member
But it doesn't work on the old input system either!
Please, read what I just wrote. I've went throught a lot of Documentatiion and Code. In a new Import, clean install, it currently doesn't work. With or Without the Unity Input System.
Please check if the Third Person Controller Virtual Controls packages aren't different from the UCC.
 

neubern

Member
Ahhh, now I see! Thankyou!
I didn't know you have to force the virtual controls to work.

I tested the Touch Components of Unity's Input System, but the Auto-Switch lags the Input, and if disabled, then no Input is then accepted. That's why the best alternative is use both systems together :/
 

nathanj

Active member
Sorry to drag this back, but anyone here able to explain what's required to get mobile control with the new input system? I'm new to the new input system (have it installed and working, just not with mobile input) and any help would be appreciated.

Thanks
Nathan
 
Top