You can launch your game within the Unreal Editor using the Mobile Preview (ES3.1) (PIE) button. Launching your game using the mobile preview means you can quickly test your game as it would appear on mobile without having to connect to a mobile device. For more information on Unreal Engine’s support for launching your game on your mobile device, see Launching to Devices.
This guide takes you through setting up the Unreal Editor and connecting to a local deployment or cloud deployment so that you can preview your game as it would appear on a mobile device.
Before following this guide, you must follow:
If you do not already have an Unreal Engine project, then you can use the Example Project to follow this guide.
To preview your game as it would appear on a mobile device, follow the steps below.
- In the Unreal Editor, navigate to Edit > Editor Preferences > Level Editor > Play and select Multiplayer Options.
- Select Play as Client from the Play Net Mode drop-down menu to ensure that the mobile preview uses SpatialOS.
- If you already have a local deployment running, select Stop Deployment.
- To connect to a local deployment of SpatialOS, in the Unreal Editor, select the Start Deployment drop-down menu and then select Connect to a local deployment.
- To start a local deployment of SpatialOS and play your mobile game, select Mobile Preview (ES3.1) (PIE) from the Play drop-down menu. This starts a server-worker instance and opens the preview window.
- Ensure that you select Stop Deployment when you have finished playing your game.
- To connect to a cloud deployment of SpatialOS, in the Unreal Editor, select the Start Deployment drop-down menu and then select Connect to a cloud deployment.
- If you want to connect to specific cloud deployment, click in the Cloud Deployment Name field and enter the name of the cloud deployment you want to connect to.
Note: If you leave the cloud deployment name blank then the GDK randomly selects a running deployment for your current project that has
dev_loginset as the deployment tag.
- To start a cloud deployment of SpatialOS and play your mobile game, select Mobile Preview (ES3.1) (PIE) from the Play drop-down menu. This opens the preview window.
2020-08-18 Page updated with editorial review: updated multiplayer options to reflect changed UI
Updated about a year ago