VirtualControls doesn't work

aledg

New member
Hi guys, I have a problem with VirtualControls. They are inserted correctly in the scene but are not displayed in the Android build. Also from the Editor play (with Android emulator) they remain disabled. The documentation says that you enable yourself on the mobile UCC use builds... Any idea?
 
Can you list the steps to reproduce within a fresh project? I just tried the virtual controls on Android and they correctly appeared.

If you want to debug it the virtual controls are disabled at runtime within VirtualControlsManager.Awake. They are then enabled within VirtualControlsManager.OnAttachCharacter. You do need to have the Unity Input component attached to your character and the virtual controls are not compatible with other input systems.
 
Can you list the steps to reproduce within a fresh project? I just tried the virtual controls on Android and they correctly appeared.

If you want to debug it the virtual controls are disabled at runtime within VirtualControlsManager.Awake. They are then enabled within VirtualControlsManager.OnAttachCharacter. You do need to have the Unity Input component attached to your character and the virtual controls are not compatible with other input systems.
Hi,

I have the same issue.
Installed by UCC menu scene set up, UI, created a character.

Movements works from PC. But UI hides on start.

On start under main manager always created the Unity Input even if I attach it to character or copy and keep in the same place where it's spawns.


What do I do wrongly?

BR,
Dmitrii
 

Attachments

  • Player.PNG
    Player.PNG
    134.6 KB · Views: 9
  • MainManagers.PNG
    MainManagers.PNG
    117.4 KB · Views: 10
  • VC.PNG
    VC.PNG
    61 KB · Views: 10
Did you manually add the UnityInput component? It shouldn't be on the root of your character - there's a PlayerInputProxy on the root and it looks like it is pointing to the CharacterBodyInput GameObject. So you have two UnityInput components on your character, and one is probably overriding the other.
 
Did you manually add the UnityInput component? It shouldn't be on the root of your character - there's a PlayerInputProxy on the root and it looks like it is pointing to the CharacterBodyInput GameObject. So you have two UnityInput components on your character, and one is probably overriding the other.
Hi,

Added it only to test advice given here before.
Usually I don’t have UnityInput there.
It’s spawn automaticly under UCC (Where main scene controls located).

The main question here how to make UI work, because now on start it just become unactive.

BR,
Dmitrii
 
You should not add it manually. This original post is a few years old and the input setup has changed. You already have the component under the CharacterBodyInput GameObject. This is likely causing a conflict and not respecting your forced input setting.
 
You should not add it manually. This original post is a few years old and the input setup has changed. You already have the component under the CharacterBodyInput GameObject. This is likely causing a conflict and not respecting your forced input setting.
Yes, as I mentioned before. I do not have it there.
Project in Univeral pipeline.

Quiestion - why UI gets unactive on play and how to fix it?

 

Attachments

  • Managers.PNG
    Managers.PNG
    67.8 KB · Views: 2
  • UI.PNG
    UI.PNG
    67.1 KB · Views: 2
  • Player.PNG
    Player.PNG
    55.5 KB · Views: 2
  • camera.PNG
    camera.PNG
    117.1 KB · Views: 1
Last edited:
What does your Player Input Proxy point to? And did you change the Forced Input to Virtual on that Unity Input component? I just tested it in a fresh scene and it stayed visible after forcing it to.
 
Back
Top