Unity - Setting Up The AndroidManifest.xml For Discover Store

Here’s a tutorial for setting up the AndroidManifest.xml in Unity for the Ouya. Games can run on the Ouya without going through this process, but once installed, these will not appear in the PLAY area on your console. They will simply be treated as a side-loaded app and be available in your MAKE area.

  1. Build your project

You’ll have to have a working (aka Buildable) project at this stage, as we will be using a temp folder to grab the default AndroidManifest.xml. Click File > Build Settings > Build and select your chosen build destination (Doesn’t really matter where it goes, as long as it builds).

  1. Navigate to StagingArea

Once your project has finished building, open up windows explorer and find your Unity project folder. In here, there will be a folder called “Temp”. Open this folder, then open the “StagingArea” directory. In here, you will find the AndroidManifest.xml. Copy this to your desktop or any other safe place and then head back into Unity.

  1. Create Necessary Directories In Your Unity Project

In your assets folder in Unity, create a new folder called “Plugins” and open the folder (if this folder already exists, open the existing folder). In this folder, you will need to create another folder called “Android” (again, if this already exists, just open the folder). Open “Android” and then paste in your AndroidManifest.xml from the StagingArea folder from step 2. This XML and any changes will be merged with your default AndroidManifest in future builds.

  1. Editing The AndroidManifest.xml

To allow your game to be installed in your PLAY area, you need to copy the following line inside the tags in the AndroidManifest, underneath the existing tags.

<category android:name="tv.ouya.intent.category.GAME" />

Once you’ve added this line, you should end up with something like the following:

  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    <category android:name="tv.ouya.intent.category.GAME" />
  </intent-filter>

Save the manifest file, then simply rebuild your project in Unity. Your Ouya game will now install in your PLAY section. :slight_smile:

2 Likes