- Home /
What are the rules for the Plugins folder in Unity 5?
The Documentation for Special folders and script compilation order explains that scripts placed in a folder called Plugins will be compiled before scripts outside of the Plugins folder. That Documentation page is not clear on whether or not the Plugins must be at the top level of Assets.
The Documentation for Special Folders says:
You can only have one Plugins folder and it must be placed in the root of the Project; directly within the Assets folder.
With Unity 5.0, the rules for how Plugins are configured in the editor changed a bit, eliminating the need for PlatformName subfolders, but this specifically deals with native and managed plugins (i.e. DLLs) and does not apply to scripts. Did this change also affect the requirement that there can only be a single Plugins folder?
I've downloaded a number of packages from the Asset Store and many of them include a Plugins folder at varying folder depths, e.g. "Assets/Package Name/Plugins".
I assume the authors of these Asset Store packages place scripts in Plugins folders for the purposes of script compilation order, however the fact that these Plugins folders are at different levels in the Assets directory it makes me question if the restriction of having a single top-level Plugins folder is still true.
In the latest version(s) of Unity, can we place Plugins folders throughout the Assets folder to control compilation order (similar to how Editor scripts must be in a folder called Editor, which can be anywhere)?
This is, indeed, an excellent question. Was searching for an answer to exactly this question and cannot find one because the two Unity docs that the OP linked to contradict each other.
Here are the references this question I could find: https://docs.unity3d.com/$$anonymous$$anual/SpecialFolders.html
https://docs.unity3d.com/$$anonymous$$anual/UpgradeGuide5-Plugins.html
http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder#.22Plugins.22
https://forum.unity3d.com/threads/move-plugins-out-of-root-folder.239432/
Your answer
Follow this Question
Related Questions
When to drop support for older versions of Unity with my asset store plugin 0 Answers
How to build a plugin before the compilation of scripts? 0 Answers
Compilation Order Quandaries - Cross Language Game-To-Library Communication 1 Answer
Plugin platform settings and publishing on the Asset Store 0 Answers