Version: 2023.1
언어: 한국어
Unity 라이브러리 매니페스트
Android 사용 시작

Unity의 Android 애플리케이션 빌드 방법

Unity uses Gradle to build Android applications so it’s useful to understand the build process and how Unity interacts with Gradle. Gradle lets you use Player Settings and other Unity windows to configure most aspects of the final build, however for more control, you must overwrite manifest and template files, or export your project and edit it in Android Studio.

빌드 프로세스

Android 애플리케이션을 빌드하려면 다음 단계를 따르십시오.

  1. Unity는 Unity 프로젝트에서 프로젝트 리소스, 코드 라이브러리, 플러그인, Gradle 템플릿, 매니페스트 템플릿을 수집하여 유효한 Gradle 프로젝트를 만드는 데 사용합니다.
  2. Unity는 Unity 프로젝트 플레이어 설정과 빌드 설정을 기반으로 Gradle 템플릿과 매니페스트 파일 안에 값을 추가하고 업데이트합니다.
  3. 프로젝트를 익스포트하고 빌드하지 않기로 했고 IL2CPP 스크립팅 백엔드를 사용하는 경우 Unity는 C# 스크립트에서 생성된 C++ 소스 파일을 Gradle 프로젝트 내에 넣습니다. 그러지 않고 프로젝트를 빌드하기로 했다면 Unity는 libil2cpp.so 라이브러리를 Gradle 프로젝트에 넣습니다.
  4. Unity calls OnModifyAndroidProjectFiles for all AndroidProjectFilesModifier interfaces. You can use this callback to modify Gradle project file values. For more information, refer to Modify Gradle project files with the Android Project Configuration Manager.
  5. Unity calls OnPostGenerateGradleAndroidProject for all IPostGenerateGradleAndroidProject interfaces. You can use this callback to modify or move files before Gradle builds the application.
  6. Unity runs Gradle to build the application from the Gradle project. Gradle merges the Unity Library Manifest, Unity Launcher Manifest, and plug-in manifests into one Android App Manifest file.

증분 빌드 파이프라인

Unity는 Android용 플레이어를 빌드할 때 증분 빌드 파이프라인을 사용합니다. 다음 Android 관련 증분 빌드 파이프라인 동작을 참조하십시오.

If you implement IPostGenerateGradleAndroidProject and modify or move any Android file or asset that the incremental build pipeline uses, it can cause issues when you build your project. If you only want to modify Gradle project files, it’s best practice to use the Android Project Configuration Manager instead of IPostGenerateGradleAndroidProject. If you must use IPostGenerateGradleAndroidProject for your use case and need to work around incremental build pipeline issues, refer to Creating non-incremental builds.

Unity 라이브러리 매니페스트
Android 사용 시작
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961