public void ChangeControls(MobileControls mobileControls) { CurrentMobileControls = mobileControls; if (mobileControls == MobileControls.Joystick) { UIServiceLocator.Instance.PlayerJoystick.gameObject.SetActive(true); } else if (mobileControls == MobileControls.Gyroscope) { UIServiceLocator.Instance.PlayerJoystick.gameObject.SetActive(false); DeviceRotation.ResetReferenceRotation(); } }