UDN
Search public documentation:

MobileProfilingHome
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Performance, Profiling, and Optimization > Profiling for Mobile Devices
UE3 Home > Mobile Home > Profiling for Mobile Devices

Profiling for Mobile Devices


Overview


In general, profiling for mobile devices involves the same techniques and tools that profiling for PC games with Unreal Engine 3 involves. However, there are some minor differences and considerations that must be taken into account as there is no in-game console on mobile devices, certain files are saved on the device instead of in the game's directory, etc. In addition, there are tools specifically for profiling on mobile devices, such as Apple's Instruments tool. This document serves to detail the process of using Unreal Engine 3's profiling tools along with other external tools to get the most out of the engine on mobile devices.

For general profiling and optimization information when developing with Unreal Engine 3, see the Performance, Profiling, and Optimization page.

STAT Commands


STAT commands are one of the most useful and common methods of profiling. Each command displays a different group of statistics on the screen giving a realtime snapshot of what is going on under the hood at any given time. This makes it extremely easy to go to a specific trouble spot in the game and see immediately what might be the issue.

stats.jpg

For a complete listing of all STAT commands and descriptions of all the stats, see the Stat Command Descriptions page.

These work on mobile just as they would for profiling a game on PC with a couple exceptions.

Executing Commands

There is no console on mobile games so there is no means to arbritrarily execute commands through keyboard entry. Some methods of executing commands are:

  • Kismet - Sequences can be set up in Kismet to execute STAT commands using the Console Command action. These sequences can be triggered at the beginning of the level or by specific events. kismet.jpg
  • UnrealScript - UnrealScript can be used to execute STAT commands by calling the ConsoleCommand() function on the PlayerController and passing it the command to execute. This gives great flexibility, but obviously requires changing code and recompiling to call different commands.
  • Menu Buttons - A debug menu can be created using the Mobile Menu System, where each button in the menu executes a different command through UnrealScript using the same method described above. menu.jpg

Limited Screenspace

Keep in mind that the STAT commands display the statistical information directly on the screen. This means it may be possible that only a portion of the stats for any one command may be visible. It also makes displaying multiple groups of stats simultaneously virtually impossible. Of course, you can always use these commands when running the game in the Mobile Previewer which will allow you to see the full set of stats. Just be aware that certain aspects may perform differently in the Mobile Previewer than on the actual device.

Game Thread Profiling


The tools used to profile gameplay on PC in Unreal Engine 3 can also be used with mobile devices. This includes the Gameplay Profiler and Stats Viewer. These are both extremely useful tools that can be used to dump information to files that can then be opened in their respective tools and analyzed to see what might be causing any issues.

gameplay.jpg

Retrieving Profiling Files

When running on a mobile device, the profiling files are created on the device itself. In order to use those files, they need to be recovered from the device. The process for doing so is detailed below.

How to Get Files from iPhone via the Unreal iPhone Packager tool:

  • Open IPP.exe in /binaries/iPhone/
  • In the Deployment Tools tab, select the device and click Backup Documents
  • Navigate to the IPA that you used on device. For example, if you cooked Release MobileGame, the IPA would be: \Binaries\IPhone\Release-iphoneos\MobileGam\MobileGame.ipa.
  • The files will be saved to \UnrealEngine3\MobileGame\iOS_Backups\
  • You can then open up any profiling files via the associated application, such as GameplayProfiler.exe.

Instruments


Instruments is an appllication provided by Apple for profiling applications on iOS devices (and OS X as well). It allows you to track processes and collect data on both the app and the operating system. This gives you the ability to do detailed performance analysis of your game running on the device.

Instruments.jpg

To monitor the processes and memory usage associated with your game:

  1. Select Memory Monitor and Activity Monitor from the iPhone section of the LIbrary.
  2. Select the iOS device running the game and All Processes from the dropdown by the Record button.
  3. Click the Record button to begin profiling.

The Memory Monitor shows overall physical memory usage, while the Activity Monitor shows each process.

Apple provides extensive documentation on using the Instruments. See the Instruments User Guide on Apple's Developer site for complete details on how to use this application.

ALERT! Note: This application requires a Mac.

Memory Profiler


Unreal Memory Profiler now supports advanced memory tracking for iOS. This can be used to help you investigate any bottle necks you may be facing.

ALERT! Note: This application requires a Mac.

Common Performance Issues


  • Using gamma correction on mobile devices can cause a serious impact on performance. It is only meant for use on powerful and future mobile devices (iPad 2 and better). If you have enabled gamma correction on mobile devices for your maps and are noticing performance issues, it may be necessary to disable it and address the lack of gamma correction through content. See Gamma for information on designing content for non-gamma corrected mobile devices.