Create a blank project

You’ll need Unity installed with Android build support. Read Get started with Unity on Android for help installing Unity as well as building and deploying to an Android device.

Although the sample application is a project, you will still need to create a blank project to import it into.

  1. Open the Unity Hub

  2. Log in (if you are not already)

  3. Select New Project

  4. Select the 3D (URP) Core template

  5. Enter project name (this will be used as the name of the project folder)

  6. Enter location (path of your project on disk)

  7. Select Create Project

Note that Universal Render Pipeline projects are recommended for mobile applications.

Unity will take a moment to create your new project and build the default assets.

Download and install the sample application

Once Unity has loaded, you will be presented with a template project. You can ignore all of the assets provided by Unity. You will only need to concentrate on the files from the sample project.

  1. Open a web browser

  2. Open the sample project page

  3. You will need to log in (if you haven’t already)

  4. On the asset (Optimizing Collisions with Burst and Neon Intrinsics) page select Add to my assets button

  5. The button will change to Open in Unity. Select it.

  6. A pop-up window will ask to open the asset in Unity. You can do this by selecting the Open Unity Editor button

  7. If Unity fails to open the asset or no pop-up appears, select My Assets button in the top-right of the page:

    a. Your assets should appear in a list

    b. Find the entry for Optimizing Collisions with Burst and Neon Intrinsics

    c. Select Open in Unity button

    d. A pop-up will appear as in step 6 above

    e. Select Open Unity Editor

  8. The Unity Editor will bring itself to the front and show the Package Manager

  9. You will see the sample project listed and highlighted. Select Download.

  10. Select Import

  11. A warning message will appear because the sample project will replace the project settings in your current project. Since we have only just created this new project, it is fine to overwrite. Select Import.

  12. A further warning may appear as the sample project has additional dependencies which our blank project hasn’t activated yet. Select Install/Upgrade.

  13. The Import Unity Package window will appear. It allows individual files and folders to be imported or ignored. You will need all of the files in the project. Leave all items ticked and select Next.

    Image Alt Text:Import sample projectFigure 1. Import the sample project using the Package Manager.

  14. A second window will open that lists the project settings that will be overwritten. We want the settings from the sample code so leave all items ticked. Select Import.

    Image Alt Text:Overwrite project settingsFigure 2. Overwrite project settings with the settings from the imported sample project.

Set up the project

Once the sample project has been imported, you will see some errors and warnings.

  1. Open File menu and select Build Settings

  2. Select Android from the Platform list

  3. Select Switch Platform

Unity will take a moment to build the assets for the Android platform.

The errors will disappear but some warnings regarding unreachable code will appear. These will be explained later but can be safely ignored for now.

Your scene view will look something like this:

Image Alt Text:Scene viewFigure 3. Default scene view of sample project.

Run the project inside the editor

It is worth checking that everything has imported and been built correctly.

  1. Close the Build Settings window

  2. In the Project tab (usually at the bottom in default configurations) you will see the list of asset files.

  3. Open the BurstNeonCollisions folder

  4. Open Scenes folder

  5. Open the scene called SampleScene

  6. Select the Play (triangle) button to launch the program.

The game will launch and you will see an empty environment begin to fill with more and more characters (capsules) over time. It will look something like this:

Image Alt Text:Screenshot at runtimeFigure 4. Sample running in Game view.

Deploy to Android

You will now deploy the sample to your Android device. Your device must already be set up for development. For detailed instructions, read the learning path Get started with Unity on Android .

  1. Open Build Settings from the File menu

  2. Tick the Development Build option

  3. Select Add Open Scenes to add the demo scene to your Scenes in Build list

  4. Plug your Android device into your computer

  5. Once recognized, your device will be listed in the drop-down menu next to Run Device

  6. The screenshot below shows the settings with a Samsung S8 selected as the Run Device

  7. Select Build and Run

    Image Alt Text:Build settingsFigure 5. Android build settings showing selected Android device.

  8. Enter a name for the APK (the Android package) and select Save

Unity will take a moment to build the Android version and then automatically deploy it to your connected Android device. Depending on your setup, the build and deployment might take several minutes.

Image Alt Text:Running on AndroidFigure 6. Sample application running on Android.