# Native plug-ins

> Details on using native plug-ins.

Unity supports native **plug-ins**, which are libraries of unmanaged code written in languages such as C, C++, and Objective-C. Plug-ins let the managed code you write in C# to call functions from these libraries. This feature allows you to integrate middleware libraries and to reuse existing C/C++ code. You can use both precompiled libraries and source code files as plug-ins. When you use source code, Unity compiles and links the plug-in code statically.

| **Topic**                                                                                                                       | **Description**                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [Overview of native plug-ins in Unity](/engine/6000.6/manual/scripting/compilation-and-code-reload/plug-ins/native/overview.md) | How to import and use native plug-ins.                                                                                            |
| [Call functions](/engine/6000.6/manual/scripting/compilation-and-code-reload/plug-ins/native/invoke.md)                         | How to call unmanaged functions in a native plug-in from managed C# code and how to callback from unmanaged code to managed code. |
| [Pass data](/engine/6000.6/manual/scripting/compilation-and-code-reload/plug-ins/native/pass-data.md)                           | How to exchange data between managed and unmanaged code.                                                                          |

> **Note:**
>
> Unity also exposes a set of native APIs that allow you to create and use plug-ins that interact directly with Unity Engine systems such as rendering, profiling, and logging. When you use these APIs, your native plug-in can interoperate with the Unity runtime directly without going through managed application code. Unity discovers and loads plug-ins that use this API automatically. For more information, refer to [Native plug-in APIs](/engine/6000.6/manual/scripting/compilation-and-code-reload/plug-ins/native-plugin-interface.md). For an example of a native plug-in that uses these APIs, refer to [Native Rendering Plugin](https://github.com/Unity-Technologies/NativeRenderingPlugin).

For platform-specific information on native plug-ins, refer to the relevant section under [Platform development](/engine/6000.6/manual/platform-specific.md).

## Additional resources

* [Low-level native plug-in interface](/engine/6000.6/manual/scripting/compilation-and-code-reload/plug-ins/native-plugin-interface.md)
* [Platform development](/engine/6000.6/manual/platform-specific.md)
* [DllImportAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportattribute?view=net-7.0)
* [Mono Interop with native libraries](https://www.mono-project.com/docs/advanced/pinvoke/)
* [Consuming Unmanaged DLL Functions](https://learn.microsoft.com/en-us/dotnet/framework/interop/consuming-unmanaged-dll-functions)
* [Marshalling Data with Platform Invoke](https://learn.microsoft.com/en-us/dotnet/framework/interop/marshalling-data-with-platform-invoke)
