So im trying to dig into android additions to my game. Is it possible to setup the input calls in the same place as the keypress so I dont have to totally copy the keypress function to adjust to input.touch? Any pointers to making a game mobile and desktop with as little adjusting as possible?
Something like this?
#if UNITY_IPHONE || UNITY_ANDROID
#if !UNITY_EDITOR && (UNITY_XBOX360 || UNITY_PS3)
You can use this structure to Instantiate things like Joysticks only for mobiles etc so if you build for desktop they wont appear. Check out AngryBots tutorial demo. The Joystick prefab handles the Touchscreen only if android or iphone is detected as a platform. You can use this structure for anything you wish to be platform depentant.