How to debug UE4 iOS games running on a real machine using Xcode analysis

Source: Internet
Author: User

This article is written because UE4 official documents, although there are, but the main is to use Ue4editor to play the game into an IPA package published in the form of the method

And for friends who want to learn or optimize through Xcode's UE4 rendering process, the official documentation is not enough, so here's a summary of the tutorial on using Xcode on your Mac to UE4 iOS app analyze.

To debug or analyze in Xcode, directly download the editor is not possible, first or to have UE4 source code, from the official or private download can be, generally 1 unrealengine package, 2 required package, first decompression unrealengine, Then the contents of required dragged into the extracted unrealengine folder,Required1 and Required2 because there is a folder with the same name, remember to choose keep newer or Merge (OSX version is different), you can copy the contents of the 3 package. Then run Generagteprojectfiles.bat, and wait until you can generate Ue4.xcodeproj's Xcode project.

Open the project with Xcode, build ue4editor directly, this process can take 10-30 minutes depending on the performance of your Mac device.

This time you also need a test of the project file, into the marketplace, download the more classic Sun Temple works well

Enter this page, after the download is complete, you can create the project

If this is the way the editor is published, you can continue to modify the package release as the official textbook, but if you need code for debugging and analysis, you can skip

Back to our UE4 source code Xcode project, run the editor, and then in the project creation page, you will see the project file created in marketplace, select Suntemple Project to enter

If the editor is not the same as the project version, you may need to make a version conversion, suggesting a minor version number, such as 4.5.0~4.5.x, which can skip or re-open a copy.


It is also important to note that you compile the ue4game. In some versions may be a Ue4ggame-ios-debug class name, UE4 in Xcode or the editor to call the Ue4ggame, or the project will be packaged failure
So you can first pack in the editor to try, if you are prompted to find ue4game and then go to this directory renaming.

In the official tutorial, mention can be made in the generated project file. Uproject Right-click on the Generate Xcode project, but this generated Xcode project is not with any engine source code, can not play the role of debugging

The correct method should be advanced into the editor, in the File->package project page, select Packaging Setting.

Here you can choose whether the graphics API used by the renderer is GLES2 or metal

Save and choose Refresh Xcode Project, which will generate the Xcode project project file with the source code for the Shader,ue4 engine.

From the project catalog into the Suntemple project, select Ue4game-ios, and run on the real machine, UE4 the default operating mechanism, is actually a unified ue4game front-end + resource Package form

In order to capture GPU information on Xcode, you need to enter Ue4game's scheme to set

Because UE4 supports both gles and metal, Xcode cannot tell which API you are using, so it must be forced to gles in the GPU Frame capture before it can be successfully analyzed.

Run Ue4game on the real machine and click to show the Debug Navigator icon to perform a GPU analysis of the currently running UE4 app

After clicking the Analyze button for a moment, Xcode captures the entire drawing process of the frame and can be browsed by sliding slider.

You can also view the shader code used in the draw call section and support dynamic modification of debugging

and debug the same way as usual debugging, in the specified section of the code to place a breakpoint on it. Solve this problem, you can UE4 on the mobile end of the rendering scheme for analysis and reference, and then I should also provide further information in this regard.

How to debug UE4 iOS games running on a real machine using Xcode analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.