- Home /
Question by
ali-smith91 · Jun 20, 2017 at 02:34 PM ·
charactercontrollerwebgljoystickvirtual
Use prefab mobile single stick control on WebGL build
So I want to be able to use the "Third Person Controller" prefab with the "Mobile Single Stick Controller" prefab in WebGL. This works perfectly fine on Android but when I change the build type to WebGL, the "mobile single stick controller" prefab stops working because it's meant for cross platform input. Which part of the script do I need to alter so it will accept my mouse interaction with the virtual joystick as input for the player?
Comment
Answer by Pavelow1806 · Nov 26, 2018 at 10:15 PM
Someone must have done this by now? It's been over a year.. bump,Someone must have attempted this by now? bump
Answer by empirreamm_unity · Oct 02, 2019 at 11:30 AM
Change MobilControlRig.cs from
#if MOBILE_INPUT
EnableControlRig(true);
#else
EnableControlRig(false);
#endif
to
#if MOBILE_INPUT
EnableControlRig(true);
#else
EnableControlRig(true);
#endif
EnableControlRig(true);
#endif