Search Unity

Custom Color Property Drawer

Discussion in 'Assets and Asset Store' started by AShim-3D, Jun 7, 2013.

  1. AShim-3D

    AShim-3D

    Joined:
    Jul 13, 2012
    Posts:
    34
    Extends default Unity3D Color Property Drawer.
    Color: copy, paste, hex.

    $Color.png

    Label, Color Picker Pick Color - standart.
    Copy To Buffer (Button) - copy color value from property (painted in property color).
    Paste From Buffer (Button) - paste color value (painted in buffer color).
    HEX (Text Field) - hex color values RRGGBBAA. (Paste there from photoshop #XXXXXX)

    HEX support color formats:
    - RRGGBBAA (8bit/component with alpha);
    - RRGGBB (8bit/component without alpha);
    - RGBA (4bit/component with alpha);
    - RGB (4bit/component without alpha).

    Usage: unzip dll into Editor folder in Unity3D project enjoy!
    Download: View attachment $ColorPropertyDrawer.dll.zip
     
    Last edited: Jun 19, 2013
    rakkarage likes this.
  2. sheva

    sheva

    Joined:
    Nov 22, 2010
    Posts:
    157
    Great feature man ! :)
     
  3. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Looks very nice. Thank you!
     
  4. AShim-3D

    AShim-3D

    Joined:
    Jul 13, 2012
    Posts:
    34
    Last edited: Jun 9, 2013
  5. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Thanks a lot, it is very useful.
     
  6. AShim-3D

    AShim-3D

    Joined:
    Jul 13, 2012
    Posts:
    34
  7. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Thanks a lot Ashim.3D...

    6R
     
  8. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Look like there is a problem with animation within Unity, it automaticly keys color when you are in the graph.
     
  9. AShim-3D

    AShim-3D

    Joined:
    Jul 13, 2012
    Posts:
    34
    2julinoleum
    Can you describe the problem in more detail?
     
  10. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Ill try:

    The problem is quite simple and not a big treat to my work.


    First of all, in the Animation window, the material’s color curves update themselves in editor mode. Look at the first image “MainColor.a” value (0,2470).

    $1.jpg

    On the second plan, I change the value to 0.25, rounded. At the exact same time as I hit enter, the value change back to 0,2470.

    $2.jpg

    In my opinion, Unity decimals values round back to their nearest hex value. Trust me; it does not happen in RunTime, only under Editor Mode.

    Another thing, linked to the first issue. When you move the current frame line (the red one), an autokey attach itself to the curve and move the curve’s value to its nearest decimal. See the third picture.

    $3.jpg

    As I said, this is not a major problem. Its a great tooll
     
  11. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Was it helpfull?