How to run unity games on android

Create an account to follow your favorite communities and start taking part in conversations.

Join Reddit

r/EmulationOnAndroid

Posted by11 months ago

Archived

How to run unity games on android

I don't mean streaming to android, and I don't mean unity games made for android in an app. I mean an app that let's you boot and run unity .exe games made for PC.

Is there a way to do it? Playing unity games on the go would be a godsend.

This thread is archived

New comments cannot be posted and votes cannot be cast

How to run unity games on android

level 1

Just as a reminder of the subreddit's rules:

  1. No requesting, or posting links to, game ROMs or ISOs, or sites to find them.

  2. Be kind to each other.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

level 1

Goodness this thread has been downvoted to hell and back. I honestly thought this would be something people want but I guess not.

level 2

i want to know as well the answer

level 1

I'm also looking for a way too. Of course I'm talking about small indie games. There are apps that let you play Ren'Py and RPGM games if they don't have ports. So, I was hoping there's something like that but for unity games

level 1

Maybe if you own the source code. Unity is multi platform.

level 1

Thanks for the answers everyone. I guess it just wasn't to be.

Exporting an Android project

This page contains instructions on how to build your Unity application for Android as well as considerations to be aware of when you do. For information on the build process for Android and the tools Unity uses, see How Unity builds Android applications.

Instead of building your application, you can also export the Unity project as a Gradle project and import that into Android Studio. This is useful if you want more control over the build pipeline, want to see or modify the Android App Manifest that Unity generates for your application, or integrate Unity-powered features into another Android application. For more information, see Exporting an Android project.

Some digital distribution services that host Android applications have particular requirements that can change the build process. For example, Google Play requires your application to be an Android App Bundle (AAB) and not an APK. If you are targeting a specific digital distribution service with your build, see the documentation for that Digital distribution service first to check if the requirements differ.

Configuring the build

Before you create a build, configure your project’s settings so that Unity builds the application with the runtime settings and build system properties you want. There are two sets of settings that configure a Unity build:

  • Player SettingsSettings that let you set various player-specific options for the final game built by Unity. More info
    See in Glossary
    : Configure runtime and build settings for the application.
  • Build Settings: Configure build system settings.

Publishing format

Unity can build Android applications in the following publishing formats:

  • APK
  • Android App Bundle (AAB)

By default, Unity builds Android applications in the APK publishing format. To make Unity build the Android application as an AAB:

  1. Select File > Build Settings.
  2. From the list of platforms in the Platform pane, select Android.
  3. Enable Build App Bundle (Google Play). If you want to export the project and build it in Android Studio, enable Export Project then enable Export for App Bundle.

Building

To build your Unity application for Android:

  1. Select File > Build Settings.
  2. From the list of platforms in the Platform pane, select Android.
    Note: If Android is greyed out, set up your project for Android development.
  3. Disable Export Project. If you want to export your project for Android Studio instead of building it within Unity, see Exporting your Android project.
  4. Click either Build or Build and Run.
  5. Select the destination for Unity to place the application. If you selected Build and Run, Unity also installs the application on the Android device connected to your computer.
  6. Click Save. This starts the build.

If you selected Build and Run, when Unity creates the build:

  • If the Split Application Binary Player Setting is enabled and the Build App Bundle (Google Play) Build Setting is disabled, Unity builds Android expansion files (OBB) for the APK and places them in the correct location on your device.
  • If the Development BuildA development build includes debug symbols and enables the Profiler. More info
    See in Glossary
    Build Setting is enabled, Unity also sets up a ProfilerA window that helps you to optimize your game. It shows how much time is spent in the various areas of your game. For example, it can report the percentage of time spent rendering, animating, or in your game logic. More info
    See in Glossary
    tunnel and enables CheckJNI before it launches your application.

Tip: After you specify the output path the first time, you can use Ctrl+B (macOS: Cmd+B) keyboard shortcut to build and run the application.

Application signing

Android applications must be digitally signed to run on an Android device. There are two types of application signing:

  • Debug signing: The default signing method for a new Unity Project. Applications that use debug signing are able to run on an Android device, but you can’t publish them.
  • Custom signing: The signing method that GradleAn Android build system that automates several build processes. This automation means that many common build errors are less likely to occur. More info
    See in Glossary
    uses when you provide custom signing information. Applications that use custom signing are able to run on an Android device and you can publish them.

To provide custom signing information, create a keystore and load it into Publishing Settings.

When you provide custom signing information, Unity doesn’t store keystoresAn Android system that lets you store cryptographic key entries for enhanced device security. More info
See in Glossary
and key passwords on disk for security reasons. This means that you need to re-enter key passwords each time you restart the Unity Editor. If you don’t provide the passwords and attempt to build the application, the build process fails. To avoid entering passwords each time you open the Unity Editor, it’s best practice to only provide custom signing information when you want to build the application to publish. To create a build for testing on a device, don’t provide custom signing information and use debug signing instead.

For more information about application signing, see Sign your app.

Distribution size

Some digital distribution services have a limit on the initial install size of your application. Unity includes the following methods to help you to optimize the install size:

  • Splitting APKs by target architecture.
  • Splitting the application binary.
  • CompressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression.
    See in Glossary
  • Minification.

Splitting APKs by target architecture

If your output application uses APK format, the Split APKs by target architecture Player Setting optimizes the application download and installation size. Instead of producing one APK that contains binaries for every target CPU architecture selected in the Target Architectures Player Setting, Unity creates a separate APK for each CPU architecture. You can upload this set of APKs to digital distribution services which serve the APK with the correct target CPU architecture to each device that downloads your application.

This is primarily a Google Play feature and may not work for other digital distribution services. For more information, see Multiple APK support.

Note: Google Play requires new applications to be AABs and not APKs. When you upload an AAB, Google Play automatically generates and serves optimized APKs for each device configuration.

Splitting the application binary

You can split your output application to make the initial install size smaller. The device can install a lighter version of your application and then download assets separately. If your output application uses APK format, Unity can split the application into a main APK and an expansion file (OBB). For more information see APK expansion files. If your output application uses AAB format, Unity can split the application into a base module and asset packs. For more information, see Play Asset Delivery.

To split the application binary:

  1. Select Edit > Project Settings.
  2. In the Project settings window, select the Player tab, then open Android Player Settings:
    How to run unity games on android
  3. In the Publishing Settings section, enable Split Application Binary.

Compression

You can change the method Unity uses to compress resource files for the application. This can reduce the size of the application but can increase loading times if the method means data takes longer to decompress.

For more information, see Compression Method.

Minification

You can use ProGuard minification to decrease the size of the application and improve performance.

To enable ProGuard minification:

  1. Select Edit > Project Settings.
  2. In the Project settings window, select the Player tab, then open Android Player Settings:
    How to run unity games on android
  3. In the Publishing Settings section, under Minify enable either Release, Debug, or both depending on the type of build you want to minify.

Note: ProGuard might strip out important code that your application relies on, so check any builds that you minify.

For more control over the minification process, generate a custom proguard.txt file and configure it to specify what not to strip. To generate the file, select Custom Proguard File in the Publishing Settings section. This generates the proguard.txt file in your project’s Assets/Plugins/Android folder. For information on how to configure ProGuard minification, see the ProGuard documentation.

Exporting an Android project

Can you port Unity games to mobile?

The time required for porting Unity game to Android mostly depends on the complexity of the game (which also determines the team composition), the set of required Android devices to run the game, and current Google Play requirements.

How do I run an APK in Unity?

Export an ..
In Unity open File | Build Settings....
Make sure Android is the current build target. If not, select Android from the list and click Switch Platform..
Click Build And Run and choose where to save the . apk file. If you have an Android device connected, it will also install the app on it..