Introducing native plug-ins for Android
Understand native plug-ins for Android and their use-cases.
읽는 시간 1분최근 업데이트: 4일 전
You can use native plug-ins in Android applications. There are different types of native plug-in, and the project's scripting backend determines which plug-in types Unity supports. The possible plug-in types are:
- Shared library: Plug-ins packaged in a shared library ().
.so - Static library: Plug-ins packaged in a static library ().
.a - C/C++ source files: C/C++ source files that Unity compiles along with IL2CPP generated files. This includes all C/C++ source files with extensions ,
.c,.ccand.cpp..h
Scripting backend compatibility
The following table shows which scripting backends support the different types of native plug-ins.
Scripting backend | Shared library | Static library | C/C++ source files |
|---|---|---|---|
| IL2CPP | Yes | Yes | Yes |
| Mono | Yes | No | No |
Notes:
- IL2CPP scripting backend doesn’t support direct use of .NET dynamic linked libraries (.dll) at runtime. These libraries must be converted to C++ code during the build process.
- Integration with other .NET runtime platforms, such as Xamarin isn’t supported.