Archive

Unity editors: Getting started

Published Friday, 27 March 2020
Creating your own Unity tool from scratch

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?)