Unreal engine мобильная разработка

Android Quick Start

Setting up for development for the Android platform.

Android_QS_Editor_TopicImage.png

This Quick Start Guide will walk you through all of the essentials for setting up Unreal Engine 4 (UE4) for Android game development, including the following topics:

  • Setting up your test device and computer for Android game development.
  • Configuring new projects for mobile development.
  • Setting up Unreal Editor for packaging Android builds.
  • Setting the editor to preview with mobile rendering feature levels.
  • Testing your project on-device from the editor.
  • Packaging a standalone build of your project.

When you have completed this guide, you will be prepared to take an Android project from initial setup to testing and packaging.

1 — Android Development Prerequisites

In order to create and deploy an Android project, you will need to install several Android development prerequisites included with Unreal Engine and ensure that your device is ready for testing.

  1. Follow the guide in Setting Up Android SDK and NDK for Unreal to install Android Studio and set up the required SDK components for Android development in Unreal.
  2. On the device that you want to use for testing, open the Settings and enable Developer Mode.
  3. Locate Developer Options in your device’s Settings, then enable USB Debugging.

Device Setup

Once you have completed these steps, you will be ready to develop new Android projects.

  • For more details about device setup, refer to our guide on Setting up Your Android Device for Development .
  • For information about installing additional Android SDKs for specific devices and features, refer to Installing Additional Android SDK .

2 — Creating Your Project

In the following section we will be creating a new UE4 project that will use the Blueprint Third Person template to show how quickly you can get a UE4 project running on an Android device.

  1. Launch Unreal Editor. In the Unreal Project Browser, use the following settings to create a new project:
    • Project Category: Games
    • Template: Top Down
    • Target Hardware: Mobile/Tablet
    • Quality Level: Scalable 3D or 2D
  2. Name your project AndroidQuickStart and click the Create Project button to finish creating the project.

Choosing Mobile/Tablet for your target hardware and Scalable 3D or 2D for your target quality level will ensure that your project accounts for the user interface and hardware limitations of mobile devices.

3 — Setting Up Unreal Editor for Android

Next, we need to make sure our Project Settings in Unreal Editor are configured for Android APK builds.

Project Settings

    Click Edit >Project Settings to bring up the Project Settings window.

Configure Now

  • Inside of the Project Settings window, navigate to Platforms >Android.
  • Under APK Packaging, there will be a warning that reads «Project is not configured for the Android platform». Click the Configure Now button to automatically set up your project to write the required platform files.
  • Fill in the Android Package Name with an appropriate company and project name. In our instance we use com.EpicGames.AndroidQuickStart.
  • If the Accept SDK License button is enabled, click it in order to accept Android’s SDK license agreement. If you have previously accepted this agreement, then you will not need to complete this step.

    Your project will now be enabled to create Android builds and launch on an Android device.

    4 — Configuring Editor and PIE for Mobile Previews

    You can set Unreal Editor’s Play-In-Editor (PIE) mode to provide a preview of how your game will look in the Mobile renderer.

      In the Toolbar, click Settings >Preview Rendering Level, then select one of the available rendering levels for Android.

    Preview Rendering Level

    Mobile Preview PIE

    Click the dropdown next to the Play button in the Toolbar. Choose one of the available Mobile Preview modes corresponding to the rendering level you selected.

    The editor will now display your game in a way that is visually consistent with your target renderer. Additionally, when you press the PIE button, your game will launch in a standalone window set to a standard mobile aspect ratio and configured to emulate a touchscreen using your mouse. These settings will not affect packaging for mobile devices, but they will ensure that you have an accurate preview when working in the editor.

    Refer to the Mobile Previewer reference for more information about how you can configure the Mobile Previewer.

    5 — Launching on an Android Device

    To test your current level on an Android-based device, you will need to do the following:

    Correct_Level_Open.png

      First need to make sure you have the level you want to test open. From this example, we will be using the ThirdPersonExampleMap level from the Blueprint based project that was created in the last step.

    Level_Deploy_Options.png

    With the ThirdPersonExampleMap now open go to the Main Toolbar and next to the Launch icon click on the small triangle that displays more options.

    launch_rightformat.png

    From the Launch menu under the Devices section select your Android device from the list by clicking on it.

    AndroidDevelopment_QS_4_PackingProgress.png

    While your level is being launched on your device, the progress will be displayed in the bottom right-hand corner of the screen like in the following image.

    AndroidDevelopment_QS_4_EndResult.png

    6 — Packaging Android Builds

    The above steps provide a way to package and immediately launch a project on device. To package a standalone APK for distribution and testing, follow these steps:

      Click File >Package Project >Android >Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1).

    Package Project

    Package Project

    If you navigate to the folder where you output your build, the folder will contain the APK and OBB files necessary to install your game on an Android device. There are also a pair of .bat files that you can use to automatically install or uninstall your build to a connected device.

    Packaging Output

    For more detailed information on configuring the Packaging settings for Android builds, refer to the Packaging Android Projects reference page.

    7 — On Your Own

    With what you have learned in this Quick Start you are now prepared to package and distribute your UE4 projects to general Android devices. You should expand on UE4’s provided templates by creating new gameplay and levels in order to create fully functional mobile game. Depending on your project’s needs and the devices that you are specificially targeting, further configuration will be required in order to optimize your builds. The following links will provide you with more information for taking the next steps in building your projects:

    • Android Development Reference — General reference information for Android developers in UE.
    • Android Development Requirements — Reference for compatible hardware as well as SDK and OS requirements to use specific versions of UE.
    • Android Debugging — How-to guide for debugging Android projects on-device.
    • Mobile Rendering — Information about Mobile-specific rendering features.
    • Mobile Services — Information about implementing online services and notifications.
    • Shipping with Android — Guidelines about preparing your game for distribution.

    Источник

    Mobile Game Development

    mobile_banner.png

    Previewing your games inside the UE4 Editor is based on the selected Mobile Platforms.

    Android_QS_Editor_TopicImage.png

    Setting up for development for the Android platform.

    iOS_QS_Editor_TopicImage.png

    Instructions on setting up and launching games on iOS devices.

    Mobile Platforms

    AndroidGameDevelopment_topic.png

    Developing games for the Android platform.

    iOSGameDevelopment_topic.png

    Developing games for the iOS platform.

    Topics

    PixelReflectionMobile.png

    Information about rendering features on mobile platforms.

    topic.png

    How-to guides for implementing mobile services

    placeholder_topic.png

    Optimizing content and features for mobile games.

    Rendering

    Services

    Help shape the future of Unreal Engine documentation! Tell us how we’re doing so we can serve you better.

    Источник

    Читайте также:  Основные понятия программирование разработка
  • Оцените статью