Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Create and use plug-ins in Android

Describes the plug-in types you can use in Android and explains how to build and use them.
Read time 1 minuteLast updated 7 days ago

You can use plug-ins to deliver resources and call Java and C++ code created outside of Unity from your C# scripts. They enable you to access features, like third-party code libraries and operating systems calls, that would otherwise not be available to Unity. For more information about plug-ins with Unity, see Plug-ins.
This section describes how to create your own plug-ins and use them in Android projects. The information on these pages assumes you already know how to create native plug-ins for Unity. For more information about native plug-ins and their uses, see Native plug-ins.

Topic

Description

Android plug-in typesUnderstand the different plug-in types available for Unity Android applications.
Calling Java and Kotlin plug-in code from C# scriptsInteract with Java and Kotlin plug-in code from your C# scripts.
Calling C# code from Java and Kotlin plug-in codeAccess your C# scripts from Java and Kotlin plug-in code.

Unity as a Library

If you upgrade your project to Unity 2019.4 or above, the introduction of Unity as a Library might require you to adapt your native and managed plug-ins to work properly for Android.