Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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.