Hi,
What is the difference between Unity Plugin and Unity package except that Unity Pro is required for a Unity Plugin?
Thanks!
Hi,
What is the difference between Unity Plugin and Unity package except that Unity Pro is required for a Unity Plugin?
Thanks!
Afaik, plugins are compiled librarys, which you can call from your code. Packages are packs that you can import and export in unity (code, assets etc). Things you download from asset store are packages.
A Package is a zip file that is specifically meant to be unzipped and place its contents in your Unity project file. (Literally, they’re zip files with a different extension). It can contain images, script files, sounds, etc. It can also contain plugins, incidentally.
A plugin is a DLL, or dynamic link library. It is purely code. Moreover, it is native code. There are certain things that are not exposed by Unity’s API, stuff along the lines of hardware drivers, and DLL’s are the only way to access those things. Since DLL’s are native, they also provide moderately higher performance than the scripting languages in Unity. This is a major reason why some computation-heavy things like AI engines are sometimes distributed in DLL’s/Plugins.
The main reason plugins are Pro-only is because they’re something of a “window to everything”. Unity enables you to do a lot of stuff, let’s say 95% of whatever you need to do, but not quite everything. Plugins allow you to do the last 5%, and that last 5% is usually pretty pro-level stuff.
Thank you for your response!!!
I know you can code in C#, JavaScript and Boo in order to write files for a Unity package. Which languages do you typically use for writing plugins?
Also, plugins are Pro-only in terms of that I can write a plugin only in Unity Pro right? Can I write a plugin in Pro and can someone else use it in the Unity Free?
Thanks!
C++ is the common one (probably the only one? I’m not sure).
No; you can only use a plugin in Pro. Pro does not, in fact, have the ability to actually create DLL’s. They are compiled elsewhere (via command line or through an IDE like Visual Studio or XCode) and imported.
(One more minor nuance: not all DLL’s are necessarily Pro-only plugins. It’s possible to compile C# code into a DLL, and I believe Free can use those plugins. This is mostly done to save compile time when changing scripts, or to prevent the code from being accessed/modified. (Often used in middleware packages so the asset’s author can keep control of the asset’s source code.) )
Thanks for an awesome answer!
So as I see this, if I write a plugin in C#, I can write it in Free and it will work on Unity Free. If I want to write a plugin in C++ (to save compile time and stuff), I gotta write a plugin in Pro and use it in Pro-only. Correct?
How is a package with a C# file different from a DLL with a C# file inside? (in terms of usage and performance) Lets say I would like to introduce a new tab in Unity (like when I use a Unity Editor), would you implement this in a package or in a plugin?
You don’t make (compile) plugins in Unity, you make them with IDEs (or command line). C# plugins work in free, C and C++ in pro.
Packages store files, dlls store code. Dll code is already compiled, so unity doesn’t have to do that. Also I think that you can compile dlls with something else than Mono (what unity uses for compiling), for example later .NET versions. IMO the main reason to use plugins, is when you need performance, or you want to hide your source code. Chances are, you don’t need to worry about either for a while, so you don’t need to worry about plugins.
You would do new editor stuff in a normal script, without need to think about packages or plugins. If you want to sell your editor stuff in the store or send it to your friend, you would export it as a package. If you want to hide your source code, you would first compile the script into a dll, put that into your project and then export the package.
Hello, following this old thread, and if I am not wrong the summary is: the Packages are built with C# scripts, also can include any multimedia files, and accessible by both Unity Free and Unity Pro (paid). On the other hand the Plugins are developed with C/C++(.dll), and only (of course) contains the code. Moreover, the Plugins are only assessible by Unity Pro.
I will happy if someone could answer my query.
Everything in this thread about the different between the free version and Unity Pro should be entirely trashed, because they reworked the licensing model entirely since the last comment here. There is now virtually no functional difference between them; it’s pretty much just the splash screen and certain services.
Packages have also evolved significantly since then, given that the Packages window did not exist. The “packages” discussed in this thread are an entirely different thing to what “Packages” means now. Old= a .unityPackage file which is essentially a zip file that puts a bunch of files in your Assets folder, after which point the package itself has no effect on anything. New= a system that installs, manages, and updates sets of code/assets which are maintained OUTSIDE the Assets folder.
tldr: forget everything you learned from this thread, it’s all wrong now.
@StarManta , thanks a lot for your explanation. I just entered into the graphics domain, so many questions, so many new things! So, I can easily develop a plugin now and import to unity to make it work.