Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a game created in Unity can run on an Android device?

I'm new using Unity and, if I understood correctly, it works using C# language. Android devices can only run Java applications cause that's the work of its virtual machine: the Dalvik. So how can this be done with the feature of this program to "compile" to Android???

like image 462
Merol Avatar asked Feb 16 '12 03:02

Merol


People also ask

Can Unity games run on mobile?

Unparalleled platform support Maximize your reach with Unity's unparalleled multiplatform support. Build your experience once for Android and iOS, then easily deploy to PC, console, VR, web and desktop platforms.

Can Unity export to Android?

Export to Android Studio In Unity open File | Build Settings... , check Google Android Project and click Export. Open Android Studio and click Import Project (Eclipse ADT, Gradle, etc.) Within the file selection dialog, navigate to the folder where you exported the project and select the folder named after your app.


1 Answers

Android devices can also run native code written normally in C or C++.

The Unity application written in C# is compiled to .NET bytecodes. When Unity builds an Android app, it includes a .NET bytecode interpreter in native code, based on Mono. When you run the app, the interpreter is run to execute the bytecodes. That's how it can run on Android.

like image 179
Randy Sugianto 'Yuku' Avatar answered Oct 09 '22 03:10

Randy Sugianto 'Yuku'