- Home /
Building Plugins only for editor
In Unity is it possible to build a plugin that is for editor only and not included in the final build? If yes how can we do that?
Answer by Bunny83 · Oct 07, 2017 at 10:23 AM
All editor code is not included in the final build. All scripts or assemblies which are located inside a folder named "editor" are compiled to a seperate assembly which is only used inside the editor. In fact the UnityEditor namespace can't be used at runtime. So it's impossible to actually put such code into a build.
In unity we have this attribute: https://docs.unity3d.com/ScriptReference/AssemblyIsEditorAssembly.html
We must put it before class.
[assembly:AssemblyIsEditorAssembly ]
I remember it add this to dll like in editor script and when you use this dll it will be threated as like editor dll.
As far as I remember.
If I wrong, correct me.
so this means we have to create 2 plugins, one for editor and one for runtime. If there will be code in it to also use at runtime?
Your answer
![](https://koobas.hobune.stream/wayback/20220612140455im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I import SimpleJSON.cs to Unity? 2 Answers
Unity editor not saving object changes 4 Answers
[ExecuteInEditMode] OnEnable Running twice on Play? 1 Answer
Unity 5 CustomEditor for Folders 1 Answer
Multiple Cars not working 1 Answer