Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ First off, if you haven't already got Unity, we recommend following their steps

- Once logged in, if you don't already have any editor versions installed, Unity may recommend the latest Long-Term Support version.

![Unity LTS suggested installation#center](images/unity-auto-suggested-install.png "Figure 1. Long Term Support version suggested by Unity Hub")
![Unity LTS suggested installation#center](images/unity-auto-suggested-install.png "Figure 1. Long Term Support version suggested by Unity Hub")

- Go ahead and install the editor they suggest. If you don't see the above screen, you can always install a version of Unity manually. Click on the _Installs_ tab on the left to see the list of installed editors (which will likely be empty):

![Empty installs windows#center](images/unity-no-installs.png "Figure 2. Unity Hub installation list (empty)")
![Empty installs windows#center](images/unity-no-installs.png "Figure 2. Unity Hub installation list (empty)")

- Click on the recommended version. On the next screen we will add the Android module:

![Recommended editor version#center](images/unity-install-lts.png "Figure 3. Install recommended LTS version")
![Recommended editor version#center](images/install-6.3.png "Figure 3. Install recommended LTS version")

You should see a list of optional features to install with your editor. You can install Android build support now. In the list, click on "Android Build Support".

![Install Android Build Support module#center](images/unity-install-modules.png "Figure 4. Add Android Build Support module")
![Install Android Build Support module#center](images/install-android6.3.png "Figure 4. Add Android Build Support module")

You now have Unity and Android support. If you forgot to tick Android Build Support or you already had a version of Unity without it, follow the next section to download Android support separately.

Expand All @@ -48,7 +48,7 @@ Follow these steps if you already have a version of Unity and just need to add t

- Click on the _Installs_ tab on the left to see your list of editor installations. Then click on the _cog_ button and select _Add Modules_:

![Add Modules option#center](images/unity-add-modules-option.png "Figure 5. Select Add Modules on the editor for which you wish to add Android support")
![Add Modules option#center](images/6.2-add.png "Figure 5. Select Add Modules on the editor for which you wish to add Android support")

- You will be presented with the module list. Select _Android Build Support_ and any other modules you wish to install. Then click _Continue_.

Expand All @@ -60,23 +60,26 @@ Android Build Support installs and manages the Android SDK and Android NDK for y

![Android settings in preferences#center](images/unity-prefs-external-tools.png "Figure 6. Android settings in Preferences")

_Note that this will be within a project not the hub_

## 3. Extract and open the Unity project

We have provided a simple project to accompany this learning path. To open it in Unity, please follow these instructions:

- Unzip the [simple profiling example](supporting-files/simple-profiling-example.zip) to your computer
- Unzip the [simple profiling example](supporting-files/simple-profiling-example.zip) to your computer.
Important to make sure you save this to your local disk and NOT a cloud storage like OneDrive as that may result in errors further down the road

- In Unity Hub, from the _Projects_ tab, select _Add project from disk_ from the drop-down menu:

![Add project from disk#center](images/unity-add-project-from-disk.png "Figure 7. Add the sample project to Unity Hub")
![Add project from disk#center](images/Add-disk.png "Figure 7. Add the sample project to Unity Hub")

- Navigate to your unzipped project directory and click "Add project"

You will see your project listed in the _Projects_ tab in Unity Hub.

- You can now click on the project to open it. We used Unity 2022.3.18f1 to create the sample; if you use a different version, you will get a warning. The project is very simple and should be safe to convert. However, if in doubt, we recommend installing 2022.3.18f1 via the Unity Hub as we have already showed.

- The project will now open in Unity. Once loaded (the first time can take a while), click on the _Play_ button to run the sample. This will run the project inside the editor. You will see a spinning cube.
- The project will now open in Unity. Once loaded (the first time can take a while) find the scene folder and open the sample scene then click on the _Play_ button to run the sample. This will run the project inside the editor. You will see a spinning cube.

![Spinning cube sample#center](images/app-running-slowly.png "Figure 8. The spinning cube sample running in the editor")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ We're going to build the sample for Android. To do so takes just a few steps and

1. First off, we need to switch the project to _Android_.

1. Select _File->Build Settings_ to show the Build Settings window:
1. Select _File->Build Profile_ to show the Build Profile window:

![Build Settings window#center](images/build-settings.png "Figure 1. Build Settings window")
![Build Profiles window#center](images/build-profiles-android.png "Figure 1. Build Profiles window")

1. Notice how the project is currently in "Windows, Mac, Linux" mode. We need to switch to Android.
1. In your project the platofrm labelled _Active_ will be your machine's operating systems (Windows, Mac or Linux). Since we are developing an android app we must rebuild for android.

1. Select _Android_ on the left and then click on _Switch Platform_. This will take a few moments as it re-builds the assets for the Android mode (this step can take longer the first time it is done for any project).
1. Select _Android_ on the left and then click on _Switch Platform_ at the bottom of the build profiles screen. This will take a few moments as it re-builds the assets for the Android mode (this step can take longer the first time it is done for any project).

![Switch platform to Android#center](images/build-settings-switch-platform.png "Figure 2. Switch platform to Android")
![List of scenes#center](images/scene-list.png "Figure 2. Scene list")

1. We must now tell Unity which scene to open when the app runs. This affects all platforms. Click on _Add Open Scenes_ to add the opened sample scene to the _Scenes in Build_ list. We will only need to do this once.

![Scenes in Build#center](images/build-settings-scenes-in-build.png "Figure 3. Scenes in Build list")

That's all we need to do to simply run the app. There are a couple more steps required to run the profiler but we'll cover those later.
1. In the screenshot, you can see that our SampleScene is already included in the build and preselected as the first scene to load.
This list shows all the scenes that will be packaged into the final build.
The top scene in the list is the one Unity will load first when the game starts.
If your project contains multiple scenes, this is where you would select which ones to include and set your startup scene.

## Prepare your Android device for development

Expand All @@ -48,9 +47,9 @@ Connect your Android device to your computer using a USB cable. Unity may take a

Android may ask for confirmation before enabling the connection.

In the _Build Settings_ window:
In the _Build Profile_ window:

1. Ensure your device appears in the _Run Device_ menu and select it.
1. Ensure your device appears in the _Run Device_ menu and select it, if the device doesn't appear make sure to press the "Refresh" button then your device should appear in the drop down menu

1. Select _Build and Run_. Choose a location to save your build.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You should always check the performance of your app on a device comparable to th

1. To activate profiling, we will enable the _Development Build_ and _Autoconnect Profiler_ options.

![Enable profiling options](images/build-settings-enable-profiling.png "Figure 1. Enable options for profiling")
![Enable profiling options#center](images/build-profiles-android.png "Figure 1. Build Profiles window")

3. You should already have the Android platform selected, so connect your device and click on _Build and Run_.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Although the sample application is a project, you will still need to create a bl

1. Select _New Project_

1. Select the _3D (URP) Core_ template
1. Select the _3D (URP) Core_ template - add photo "urp confirmation"

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

Expand Down Expand Up @@ -77,11 +77,11 @@ Once Unity has loaded, you will be presented with a template project. You can ig
## 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_
1. Open _File_ menu and select _Build Profiles_

1. Select _Android_ from the Platform list

1. Select _Switch Platform_
1. Select _Switch Platform_as you have done in the [previous learning path](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/get-started-with-unity-on-android/3-test-on-android/)

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

Expand All @@ -95,9 +95,9 @@ Your scene view will look something like this:

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

1. Close the _Build Settings_ window
1. Close the _Build profiles_ window

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

1. Open the _BurstNeonCollisions_ folder

Expand All @@ -114,21 +114,21 @@ The game will launch and you will see an empty environment begin to fill with mo
## 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](/learning-paths/mobile-graphics-and-gaming/get-started-with-unity-on-android).

1. Open _Build Settings_ from the File menu
1. Open _Build profile_ from the File menu

1. Tick the _Development Build_ option

1. Select _Add Open Scenes_ to add the demo scene to your _Scenes in Build_ list
1. Select _Add Open Scenes_ to add the demo scene to your _Scenes in Build_ list - check if this is needed

1. Plug your Android device into your computer

1. Once recognized, your device will be listed in the drop-down menu next to _Run Device_

1. The screenshot below shows the settings with a _Samsung S8_ selected as the _Run Device_
1. The screenshot below shows the settings with a our demo device selected as the _Run Device_ you will see you own device in this box

1. Select _Build and Run_

![Build settings#center](images/android-build-settings.PNG "Figure 5. Android build settings showing selected Android device.")
![Build settings#center](images/android-build-settings.PNG "Figure 5. Android build settings showing selected Android device.") - update SS

1. Enter a name for the APK (the Android package) and select _Save_

Expand Down