0% found this document useful (0 votes)
30 views27 pages

Build APK for Android in Unity

This document provides a step-by-step guide for building an APK for Android using Unity, including platform installation, player settings, and creating buttons. It details how to switch to the Android platform, configure player settings like app icons and orientations, and add scenes to the build. Additionally, it explains how to create and script buttons for scene transitions within the app.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views27 pages

Build APK for Android in Unity

This document provides a step-by-step guide for building an APK for Android using Unity, including platform installation, player settings, and creating buttons. It details how to switch to the Android platform, configure player settings like app icons and orientations, and add scenes to the build. Additionally, it explains how to create and script buttons for scene transitions within the app.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module Extra

Build APK (Android)


Content
1. Android Platform Installation
2. Player Setting
3. Extra Button
Make sure the scene is save by
click Ctrl + S
Open Build Setting
Open Build Setting

1. Go to menu bar on top and


choose File > Build Setting
Build Setting Window

Build Setting window will


appear as image on the right.

To create APK for Android


devices, we need to have
Android platform.
1

Change to Android platform by


click Android then click
switch platform.

2
Build Setting Window
1

Add your current scene in the Build


Setting.

First delete unwanted scene and add 2

current scene at Add Open Scenes.

Make sure the scene you want to


display in the app is ticked.

The scenes must be arranged


correctly
Android Platform Installation
Android Platform Installation

If you could not click on switch


platform it means you have not
install the Android platform in
the Unity.

You have to install the


Android platform from the
Unity Hub.
Android Platform Installation
In the Unity Hub, go to Installs > click on setting on Unity Version currently used > Add Modules.

3
Android Platform Installation

After clicking Add Modules,


Tick on Android, Android
SDK & NDK Tools, Open JDK.

✓ Android 1

✓ Android SDK & NDK 2

Tools 3

✓ Open JDK

Then click Done.


4
Player Setting
Player Setting

Open Player Setting by clicking


Player Setting in the Build
Setting Window.

1
Player Setting
Change the app Icon
1. Click on Icon drop
down button.
2. Click on Default Icon 2
to place the Icon
image.
3. Click on Background
to place the
Background Image of
icon. 1

4. Click on Foreground
to place the Image of 3
icon without
background. 4
Player Setting ( Icon Reference size)
• Make sure the icon
image is square and
all of the size is the
same.
• Provide three
different image:
1. Logo +
Background
image.
2. Background only.
3. Logo only.
Player Setting

Go to Other Setting and Tick On Auto Graphics API.


Player Setting

Change the Orientation Phone


by clicking at under the
Orientation in drop down button
at Default Orientation.

Choose Portrait. 1
Build Setting Window
Rename the Package Name as
• com.[Company Name].[ProductName]

1
Player Setting
• Go to Splash Image
• Replace logo you
want at (2) 1

• Click on +
• Replace Logo at (4)
• Place background at 4

Background Image 3

5
Build Setting

Go back to build setting and


click on Build

1
Extra - Create button
Create button
• Go to hierarchy , right
click go to UI > Button
Create Button
To adjust position, size and rotation
of the button

To put image at button

To make the button function


Create button
• Create new script for
button
• After copied all the text,
save the script.
Create button
• Create empty Game
Object.
• Right Click > Create
Empty
Create button
• Rename the empty Game Object as Script Tukar Scene.
• Drag the Script TukarScene from Project @ Select Add Component
> Search TukarScene and select the script.
Create button

Select the
function
tukarSceneLain

Select the
TukarScene
script

Type the scene


you want to go

You might also like