I'm trying to conditionally show virtual joysticks only when running on an iOS device, and use keys instead in the Editor on my laptop.
I tried the following, and in MonoDevelop the #else clause is dimmed out and I'm not seeing the virtual joysticks on iOS.
#if UNITY_EDITOR
leftJoystick.SetActive(false);
rightScreenTap.SetActive(false);
#else
leftJoystick.SetActive(true);
rightScreenTap.SetActive(true);
#endif
Does anyone know the correct way to do this ?
Thanks
↧