Lesson 118 +10 XP

Android, iOS and WebGL Build Specifics

Android, iOS and WebGL Build Specifics

Building and deploying your game requires configuring settings specific to target platforms.

Android Build Requirements

  • Package Name: Format as a reverse domain string (e.g. com.Company.GameName).
  • Keystore Signing: Releases must be signed with a secure keystore file configured in Player Settings > Publishing Settings.
  • Architectures: Google Play requires 64-bit support. Set Scripting Backend to IL2CPP and enable ARM64.

iOS Build Requirements

Building for iOS produces an Xcode Project folder instead of a final app binary:

  1. Generate the build from Unity (requires macOS).
  2. Open the generated .xcodeproj file in Xcode.
  3. Select your development team to set up signing certificates.
  4. Connect an iOS device and click Run to compile the final IPA.

WebGL Limitations and Setup

WebGL games compile to WebAssembly and run inside a web browser sandbox.

Key Restrictions:

  • No Multithreading: Code runs entirely on a single browser thread.
  • No Direct File Access: Use PlayerPrefs or communicate with JavaScript APIs.
  • No Sockets: Use WebSockets or Unity Web Requests (UnityWebRequest).
// Example WebGL JSLib integration (placed in Assets/Plugins/WebGL/MyPlugin.jslib)
/*
mergeInto(LibraryManager.library, {
  AlertFromBrowser: function (str) {
    window.alert(UTF8ToString(str));
  }
});
*/

TL;DR

  • Android builds require an IL2CPP backend, ARM64 target, and keystore signing.
  • iOS builds require Xcode on macOS to sign and compile the final binary.
  • WebGL runs in a browser sandbox without file system access or standard threading.