JAR plug-ins
Understand JAR plug-ins and learn how to use them to interact with the Android operating system or call Java code from C# scripts.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
You can use Java Archive (JAR) plug-ins to interact with the Android OS or to call methods written in Java from C# scripts.
Java Archive (JAR) plug-ins contain Java code that you can call from C# scripts. They're useful if you want to interact with the Android operating system, or just call Java code from C#.
This type of plug-in is useful if you plan to reuse Java code in multiple projects, or distribute it to other people. If instead you only want to write a small amount of Java code for a single project, then a Java or Kotlin source code plug-in might be more appropriate.
Import a JAR plug-in
To import a JAR plug-in (AAR) plug-in into your Unity Project:
- Copy the file to your Unity Project's Assets folder.
.jar - Select the file in Unity and view it in the Inspector.
.jar - In the Select platforms for plugin section, select Android.
- Select Apply.