Version: Unity 6 Preview (6000.0)
Language : English
Optimize for user preferences
Android plug-in types

Create and use plug-ins in Android

You can use plug-ins to deliver resources and call Java and C++ code created outside of Unity from your C# scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
. 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-insA set of code created outside of Unity that creates functionality in Unity. There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed .NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). More info
See in Glossary
.

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-insA platform-specific native code library that is created outside of Unity for use in Unity. Allows you can access features like OS calls and third-party code libraries that would otherwise not be available to Unity. More info
See in Glossary
.

Topic Description
Android plug-in types Understand the different plug-in types available for Unity Android applications.
Call Java and Kotlin plug-in code from C# scripts Interact with Java and Kotlin plug-in code from your C# scripts.

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.

Optimize for user preferences
Android plug-in types