Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

CustomPropertyDrawer has no effect

Discussion in 'Immediate Mode GUI (IMGUI)' started by roseportalgames, Oct 31, 2021.

  1. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    173
    Hi all,
    I have implemented a CustomPropertyDrawer script for adding properties to the Color property:

    [CustomPropertyDrawer(typeof(Color))]
    public class ColorPropertyDrawer : PropertyDrawer
    {
    ...
    }

    It works for custom scripts that have a Color property but not, for example, for the color in SpriteRenderer?

    Even added some Debug.Log's to see if it's actually doing anything. But it's not. I don't have another CustomPropertyDrawer for Color in my project. It's in the Editor folder.