Unity editors: Getting started
This blog post will cover the basics of how to setup your project in order to create some custom editors. What is written here applies to all custom editors wether they be Editors, Editor windows, custom property drawers, custom object previews etc.Accessing Unity's Editor API.
For performance and build size reason Unity has chosen to split their API up in several different parts (called Assemblies). The Editor part of Unity is only used when working in the Unity editor and is therefor not included or accessible from normal game play code. All if Unity's Editor classes resides in the
UnityEditor namespace (the core resides in UnityEngine) If you where to create a normal new MonoBehaviour derived class and try access anything in the UnityEditor namespace when you try to build your game you will get an error message saying The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?)