Please Help With "There is already a virtual axis named 'horizontal' registered

Hello Ev1 and sorry for my bad english.

i dont know why this is happening, the console give me this error:
There is already a virtual axis named ‘Horizontal’ registered
and
There is already a virtual axis named ‘Vertical’ registered
iv never made any change on the controller scripts, they were fully functional uppon this morning

(im using the dual touch and jump button controller).
well an image says more than 1000 words

For every one that got this error, erase yur layer, save, close unity, and remake the player (dont reimport from prefab)

I have a simple solution for this hope this will help…
Double click on error this will open the script just replace this line
Debug.LogError(“There is already a virtual axis named " + axis.name + " registered.”);
with
UnRegisterVirtualAxis(axis.name);
RegisterVirtualAxis (axis);

33 Likes

The error message is harmless. It is generated by VirtualInput.cs when registering an axis, it checks first if axis has not yet been registered.

One quick solution would be to remove this debug log error in VirtualInput. However the true question is why the axis is already registered. You should track (debug log) any call to RegisterVirtualAxis to know which scripts and where are registring these axis.

Game Rules
Unified Visual Scripting Asset with rules engine

duuuuuuuuuuude men u are a saviour idk if its an old post but it worked thanks dude

1 Like

You are right thank you

2019 and this is still relevent, thnaks!!

Yes, still relevant, thank you!!!
Been going crazy as to why it worked on a 2018 Unity project and not a 2019 project.

2020 and this still works in version 2019.3.12

This is something I need thank you buddy for your help

SIGUE TRABAJANDO GRACIAS MUCHO!

1 Like

Thanks

Thanks man.

THANKK YOU

its working

2021 and It’s still working !!

Thanks a lot asadali ,right now 03/07/2021 its works GREAT!! a lot

2021, works. This is more logical… idk why the dev decided to log it as an error though.

thanks Bro it is completely working on 2021.1.2

Still working using 2021.2.12 THANKS DUDE.

STILL WORKING