Is it possible to make my C# game cerated with unity 3d work on android

Hey, Recently i created a basic 2d game in unity 3d, I wrote my scripts in c# but i i wanted to convert it and make it work on android devices

is that possible or i need to re-write the whole game again in java?

MY GAME Is kinda like a clone of flappy bird and i’ve written it in c# and the input key is space button to make the bird fly. what all should i do to make it work on an android and ios device and change the input key to a touch screen.

sorry for my bad English and i’m new to unity.

Just change the input from keyboard to touch screen and build for the mobile platforms.
I may be speaking about something not in my wheel house, but from my understanding script language has not bearing on deployment platform. (artist knowledge - buyer beware)

An easy way for you to do that would just be to create a canvas with an invisible image taking the whole screen, then assign an EventTrigger component to the image’s gameobject and connect an OnPointerDown event to your jump function (Beware of multi-touch).

1 Like

L

[quote=“Eroy2, post:3, topic: 624743, username:Eroy2”]
An easy way for you to do that would just be to create a canvas with an invisible image taking the whole screen, then assign an EventTrigger component to the image’s gameobject and connect an OnPointerDown event to your jump function (Beware of multi-touch).
[/quote]Sorry i didn’t get you.

simple solution a big button in canvas no artwork or text and Ipointerup and Ipointerdown

the harder solution
touch class
import
//please not this is off my head
foreach ( touch touches in Touch) {
getcomponent().addforce

}

1 Like

Just use the mouse input, it works as a single touch, and it is quite easy.