AAR(Android Archive) 플러그인은 컴파일된 Java, 네이티브(C/C++) 코드, 리소스 또는 Android 매니페스트가 포함된 번들입니다. .aar 파일 자체는 모든 에셋을 포함하는 zip 아카이브입니다. 자세한 내용은 Android 라이브러리 생성에 대한 Android 개발자 문서를 참조하십시오.
AAR 플러그인을 프로젝트에 추가하려면 .aar 파일을 프로젝트 폴더 중 하나에 복사합니다. 그리고 Unity의 인스펙터 창에서 임포트 설정을 열고 선택합니다. Android 체크박스를 선택하여 .aar 파일을 Unity와 호환 가능으로 표시합니다.
AAR은 Unity Android 애플리케이션용으로 권장되는 플러그인 포맷입니다.
Android 라이브러리 프로젝트는 AAR 플러그인과 비슷하며 네이티브 및 Java 코드, 리소스 및 Android 매니페스트가 포함되어 있습니다. 그러나 Android 라이브러리는 단일 아카이브 파일이 아니라 모든 에셋을 포함하는 특별한 구조의 디렉토리입니다. 자세한 내용은 Android 라이브러리 생성에 대한 Android 개발자 문서를 참조하십시오.
사전 컴파일된 Android 라이브러리 프로젝트를 Assets/Plugins/Android 폴더로 임포트합니다. 사전 컴파일은 모든 .java 파일을 .jar 파일로 컴파일하여 Unity에 임포트하기 전에 Android Studio 프로젝트의 bin/ 또는 libs/ 폴더에 있어야 한다는 것을 의미합니다. 폴더에서 AndroidManifest.xml 파일은 프로젝트가 빌드될 때 메인 매니페스트 파일과 자동으로 병합합니다.
Unity는 Assets/Plugins/Android의 모든 하위폴더를 잠재적 Android 라이브러리로 취급하고, 이 하위 폴더에서 에셋 임포트를 비활성화합니다. 하위 폴더가 AndroidManifest.xml 파일을 포함하고있는 경우 Android 라이브러리로 인식하며 project.properties 파일에는 android.library=true
문자열을 포함합니다.
라이브러리 모듈의 Android 개발자 문서에서 자세한 내용을 참조하십시오.
에셋 변경 없이 출력 패키지로 복사해야 하는 Unity 애플리케이션에 에셋을 추가하려면 에셋을 Assets/Plugins/Android/assets 디렉토리로 임포트합니다. APK의 assets/ 디렉토리에 표시되며 Java 코드의 getAssets() Android API를 사용하여 액세스할 수 있습니다.
2017–05–18 페이지 게시됨
Unity 5.5에서 업데이트된 기능
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.