- Home /
How to call "Enable MobileInput" Function when building to android?
Hi, when developing I always use Keyboard Input in the UnityEditor, so I turned off MobileInput from Unitys CrossPlattform StandardAssets. Of course when I build the app to android I need to enable it, but I find this quite annoying to do everytime, and sometimes I forget this and need to build it again.
.
So is there any callback when building has started to automatically activate MobileInput and when finished to deactivate it again?
Thanks in advance.
Answer by Vipers · Dec 03, 2018 at 05:11 PM
Hey, I think you could use Platform dependent compilation, creating a single script with states that would work for any platform, you can see it here: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
Also, if the app is supposed to be for Android only, you could write all the scripts for Mobile Build, and use the Unity Remote 5 App with your phone, connecting it with the computer and playing your game/app live :)
Hope it helps!