“AGDE 简直太棒了!”;使用 Unreal Engine 进行 Android 开发
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Unreal Engine 是由 Epic Games 开发的游戏引擎,可为各行各业的创作者提供自由和控制权,让他们提供先进的娱乐、富有吸引力的可视化内容和沉浸式虚拟世界。一些主要的 Android 游戏都是使用 Unreal Engine 构建的。
图 1. 在 Pixel 4 上运行的 Unreal Engine Suntemple 示例的屏幕截图
Epic 和其他游戏开发者使用 Android Studio 调试 C++、Kotlin 或 Java 编程语言,但许多游戏开发者都有以 Visual Studio 为中心的其他平台的开发工作流。Unreal Engine 移动团队专注于面向移动平台的 Unreal Engine 功能开发和优化。该团队一直在将 Android Game Development Extension (AGDE) 用于 Unreal Engine Android 开发以及《堡垒之夜》 Android 调试和优化。
使用方式
在采用 Android Game Development Extension (AGDE) 之前,针对 Android 进行调试和构建需要在 Android Studio 中打开生成的 Gradle 项目,然后在两个开发环境之间切换以进行编译或调试,每个环境都有自己的一组按键绑定。这不仅会给开发者带来不快,而且非常耗时,尤其是对于迭代开发。现在,有了 AGDE,Android 游戏的整个开发工作周期都在 Visual Studio 中!迁移到新开发工作流的开发者会发现,对于 Unreal Engine 开发而言,新开发工作流不仅速度更快,而且更方便。
安装 AGDE 后,每当您为 Unreal Engine (UE) 4.26.2 或更高版本生成 Visual Studio 项目文件时,Unreal 构建工具也会生成与 AGDE 搭配使用的 Android 构建目标。从那以后,在 Visual Studio 中,Unreal Engine 开发和调试体验与 PC 及其他平台完全相同。在 Visual Studio 中按 F5 会使 AGDE 生效,然后触发 C++ Android 构建并生成或更新 Android 应用软件包 (APK)。然后,AGDE 会在设备上启动一个 C++ 调试会话,从而允许使用熟悉的 Visual Studio 调试功能,例如断点、监视器以及查看反汇编和寄存器。支持 AGDE 的 Android build 还利用 Unreal Build Tool 的 Incredibuild 集成,为 Android C++ 代码提供跨计算机分发的 build。
图 2. 使用 Unreal Engine 的 AGDE 的屏幕截图
成果
“鉴于我们以 Visual Studio 为中心的开发环境,我们很高兴能够将 AGDE 纳入我们的工作流。我们肯定认为使用 AGDE 是成功的,因为《堡垒之夜》和 Unreal Engine 移动工程师每天都在使用 AGDE 来完成工作。”Unreal Engine 移动团队负责人 Jack Porter 表示。“借助 AGDE,Epic 可以更快速、更方便地调试问题,而停留在 Visual Studio 中后,与之前的工作流相比有了显著的改进。使用 AGDE 确实为我们节省了大量时间,并帮助我们发现了通过其他方式找不到的 bug”。
“我们预计会在 Epic 中继续使用 AGDE,并计划在我们的文档中推荐 AGDE 作为所有 Unreal Engine 被许可人的受支持 Unreal Engine Android 开发者工作流。”Porter 说。
Unreal Engine 移动团队开发者 Dmytro Vovk 一直在使用 AGDE 来开发 Unreal Engine 和《堡垒之夜》移动版。他表示:“AGDE 太棒了!最后,我可以调试汇编代码,并在逐步检查代码时看到寄存器正在更新。在 Visual Studio 中轻松进行 Android 调试,让我的日常工作变得更轻松,并让我能够一直按自己的开发流程操作。”
开始使用
了解 Android Game Development Extension 如何帮助您在 Visual Studio 中使用 C/C++ 构建跨平台游戏时以 Android 为目标平台。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2021-07-12。
[null,null,["最后更新时间 (UTC):2021-07-12。"],[],[],null,["# "AGDE is freaking awesome!" for Android development with Unreal Engine\n\n[Unreal Engine](https://www.unrealengine.com/en-US/) is a game engine\ndeveloped by Epic Games that gives creators across industries freedom\nand control to deliver cutting-edge entertainment, compelling\nvisualizations, and immersive virtual worlds. Some major Android games are\nbuilt using Unreal Engine.\n\n\n**Figure 1**. Screenshot of Unreal Engine Suntemple sample running on Pixel 4\n\nEpic and other game developers use [Android\nStudio](/studio) for debugging C++, Kotlin or\nJava programming languages, but many game developers have development\nworkflows for other platforms centered around Visual Studio.\nThe Unreal Engine Mobile Team focuses on feature development and\noptimization of Unreal Engine for mobile platforms. The team has been using\nAndroid Game Development Extension (AGDE) for both Unreal Engine Android\ndevelopment and for Fortnite Android debugging and optimization.\n\nHow they use it\n---------------\n\nBefore adopting [Android Game Development Extension (AGDE)](/games/agde), debugging and\nbuilding for Android required opening the generated Gradle project in\nAndroid Studio and then switching between the two development environments\nfor compiling or debugging, each with their own sets of key bindings. This\nwas both jarring to the developer and also time-consuming, especially for\niterative development. Now with AGDE, the entire development work cycle for\nAndroid games is within Visual Studio! Developers who have migrated to the\nnew development workflow will find it is significantly faster and more\nconvenient for Unreal Engine Development.\n\nAfter installing AGDE, whenever you generate your Visual Studio project\nfiles for Unreal Engine (UE) 4.26.2 or later, Unreal Build Tool will also\ngenerate Android build targets for use with AGDE. From then on, the Unreal\nEngine development and debugging experience from within Visual Studio is\nthe same for Android as PC and other platforms. Pressing F5 inside Visual\nStudio kicks AGDE into action, which then triggers the C++ Android build\nand generates or updates the Android Application Package (APK). AGDE then\nstarts a C++ debugging session on the device, allowing the use of familiar\nVisual Studio debugging features such as breakpoints, watches, and also\nlooking at disassembly and registers. AGDE-enabled Android builds also take\nadvantage of Unreal Build Tool's Incredibuild integration to provide\ndistributed builds across computers for Android C++ code.\n\n\n**Figure 2**. Screenshot of AGDE with Unreal Engine\n\nResults\n-------\n\n\"Given our Visual Studio-centric development environment, we were very\nexcited to incorporate AGDE into our workflows. We definitely consider our\nuse of AGDE a success because Fortnite and Unreal Engine Mobile engineers\nare using AGDE daily for their work,\" said Jack Porter, Unreal Engine\nMobile Team Lead. \"AGDE allowed Epic to more quickly and conveniently debug\nissues, and staying inside Visual Studio made a significant improvement\nfrom their previous workflow. The use of AGDE has definitely saved us\nsignificant time, and helped us find bugs that otherwise could not have\nbeen found\".\n\n\"We expect to continue using AGDE at Epic, and plan to have our\ndocumentation recommend AGDE as the supported Unreal Engine Android\ndeveloper workflow for all Unreal Engine licensees,\" said Porter.\nDmytro Vovk, an Unreal Engine Mobile team developer, has been using AGDE as\npart of his daily work on Unreal Engine and Fortnite Mobile, and says \"AGDE\nis freaking awesome! Finally I can debug assembly and see registers being\nupdated as I step through the code. Android debugging from the comfort of\nVisual Studio makes my day-to-day work much easier and keeps me in my\ndevelopment flow.\"\n\nGet started\n-----------\n\nLearn how the\n[Android Game Development Extension](/games/agde)\nenables you to target Android when building cross-platform games with C/C++\nin Visual Studio."]]