In this section, we will explore a way to create custom GUI for our properties using Property Drawers.
Drawer allows you to control how the GUI of a
Serializable class or property is displayed in the Inspector window. This approach significantly reduces the amount of work you have to do for the GUI customization because you don't need to write an entire custom inspector. Instead, you can just apply appropriate attributes to variables in your scripts to tell the editor how you want those properties to be drawn.
Unity has several built-in Property Drawers. In the following example, we will use the
using UnityEngine; public class DrawerExample : ...