Version: 2020.1
Assembly Definition File Format
Inspector de Plugins

Plug-ins

In Unity, you normally use scripts to create functionality, but you can also include code created outside Unity in the form of a plug-in. There are two kinds of plug-ins you can use in Unity: Managed plug-ins and Native plug-ins.

Managed plug-ins are managed .NET assemblies created with tools like Visual Studio. They contain only .NET code which means that they can’t access any features that are not supported by the .NET libraries. However, managed code is accessible to the standard .NET tools that Unity uses to compile scripts. There is thus little difference in usage between managed plug-in code and Unity script code, except for the fact that the plug-ins are compiled outside Unity and so the source may not be available.

Native plug-ins are platform-specific native code libraries. They can access features like OS calls and third-party code libraries that would otherwise not be available to Unity. However, these libraries are not accessible to Unity’s tools in the way that managed libraries are. For example, if you forget to add a managed plug-in file to the project, you will get standard compiler error messages. If you do the same with a native plug-in, you will only see an error report when you try to run the project.

The following pages explain how to create plug-ins and use them in your Unity Projects:


  • 2018–03–19 Page amended

  • MonoDevelop replaced by Visual Studio from 2018.1

Assembly Definition File Format
Inspector de Plugins