Cross-Platform Game Modes
Writing our Blueprints
8. Creating AR Game Mode
In Unreal Engine, you typically use a custom AR_GameMode when building AR applications for Android and iOS to set up the core rules, behavior, and environment needed for augmented reality experiences. Like other Game Modes, our AR_GameMode
defines the rules and flow of the experience or game. This may include defining who the player is, what happens when the game starts, and what actors get spawned. This is especially important when spawning AR sessions and trackable objects.
As we continue to develop this AR application in the future, the AR_GameMode
can help us with the AR session lifecycle such as starting, pausing, and stopping. In addition to showing and displaying UI, notifications, 3D models, animations, and much more.

With Unreal's default AR template, you should find a BP_ARGameMode
defined for you. If you do not have one, in your Content Drawer, right click and create new Blueprint Class / Game Mode Base
. Then, name your Blueprint BP_ARGameMode. Finally, make sure that in the Details panel, the Default Pawn Class
is set to your AR Pawn, which in our case would be BP_ARPawn
.
9. Cross-Platform Handling
Because we are designing for a mobile device, the scene will need to be preared for ARKit (iOS) or ARCore (Android) input. Since ARKit and ARCore have and are different APIs, Unreal Engine abstracts that with the ARSessionConfig and AR-specific actors/components.
Augmented Reality with Apple
Resources for creating AR applications for Apple devices.
Augmented Reality with Google
Resources for creating AR applications for Android devices.
Our AR_GameMode
is helpful here in handling platform-specific beavior, configuring the ARSession
, and bringing a consistent experience across platforms.

Now we need to make sure we have all the settings configured correctly.
Edit/ Project Settings / Map & Modes
then navigate to theDefault Maps
tab and find Game Default Map whereAPK Packaging: Orientation
should beSensor Portrait
orPortrait
.Edit/ Project Settings / Engine Input
setDefault Touch Interface
toNone
.- If building to Android:
Edit/ Project Settings / Platforms - Android
and uncheckSupport Vulkan
- If building to iOS:
Edit/ Project Settings / Platforms - iOS / XCode Projects
keepModern XCode
enabled by checkingModernized Xcode
. Then, input your Apple Dev Account Team ID. Navigate to theiOS
tab and input aBundle Display Name
andBundle Name
and checkSupports Portrait Orientation
.
Apple Developer
Sign into your Apple Developer Account
10. AR Plugins
If you are developing for Android, install the Google ARCore plugin. For iOS, install the Apple ARKit.