- Home /
Converting PC game to Mobile Android Help?
I'm apologize in advance for my lack of knowledge in Unity.
So I have this game 3/4 done, and I want to test play it on my Nexus 7, because I am creating the game for Android devices. Problem is, I've been making the entire game with PC mechanics.
Can someone help me, or rather lead me toward tutorials specific to this particular situation I am having? I need to know what to add in correctly to convert my PC game into a Mobile game.
And no, this isn't a question about how to make my game into an .apk file. I already have everything set up for the SDK and all of that stuff. I just need to know how to make my game Mobile-friendly.
There are a large number of posts on this list on touch if you want to use the built-in classes. You might want to consider abstracting away much of the differences through a third-party solution. I use FingerGestures. I understand Prime31 has a solution (I believe it is free). You still have to code and test all the two (or more) finger gestures, but a third-party abstraction gets you most of the why there.
Sorry, maybe I wan't being clear enough. There are the $$anonymous$$obile Assets folder given to you already in Unity. It has all the touchscreen joysticks and scripts for $$anonymous$$obile games.
How do I take out the Standard Assets I am using (Because I've been starting off with making this game with the Standard Assets), and replace them with the $$anonymous$$obile Assets so I can make it touch screen, etc. so when I compile it into an .apk file, I can actually test play it.
Because the WASD keys won't work if I tried to test play it on my tablet, and my other two functions for the game, the F and R key, aren't going to work also. So is there a tutorial that might help me change or convert my game with Standard PC Assets, scripts, etc. into $$anonymous$$obile Assets? I've been searching up tutorials and they get their controls for ping-pongs, star-ships, from the assets store. I am making a FPS horror/survival game.
You will need to replace the input handling you have now with touch controls and I assume GUI buttons or gestures. You make it sound like you are looking for a simple swap to make things mobile, but you will have to do a little more work than that. Using the touchscreen joystick should be enough to replace your WASD movement, but you will need to make some decision about how the other two key presses you mentioned get handled on mobile(i.e. buttons or gestures). Also, any input you get from your mouse on the PC has to be handled as touch input on the device. There are many ways to do these things, and as @robertbu mentioned many packages as well.
Really, more thought should have been given to your mobile input handling from the start of your game, since you say you are targeting Andriod. Of course you need to handle mouse and keyboard input as well for testing in the Editor, but dont just think of input handling as a simple swap, as not all PC input translates directly to mobile devices. Take some time to think about how you want your game to play on mobile and build out your controls that way.
Thank you for clearing that out to me.
I just need two joysticks at both corners at the end, the one in $$anonymous$$obile Assets where it's a box with dotted lines that outlines the shape of the square at the corners, for a touchscreen. Also, I only need two buttons in the middle (Turn on/off flashlight, put in batteries when flashlight flickers).
So I understand how to put in the joysticks in my hierarchy, but do I add any specific scripts from $$anonymous$$obile Assets into my player for the joysticks to work? I need to understand how to do this first before we go into adding the buttons in the middle of the touchscreen joysticks for the 2 other keys.