Search Unity

Color Picker

Discussion in 'Immediate Mode GUI (IMGUI)' started by bakno, Apr 30, 2008.

  1. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    604
    Hello

    Is it possible to show a system color picker when the game is running?

    This is to provide the user with the ability to colorize objects at will.

    Regards,
    Andres
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It's possible, but there are problems, such as not being able to use it in full-screen mode. I went through this with trying to get a system file requester to work, and ended up writing my own in Unity.

    --Eric
     
  3. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    604
    Thanks Eric

    Can you please give me a light on how to program such feature in Unity?

    Andres
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    In the Unity manual, under the GUI scripting guide, there's an example in "Extending UnityGUI" of making a RGB compound control, which might get you started. If you wanted a color wheel, you could make a texture and use ReadPixels to get the color, plus a slider to brighten and darken it.

    --Eric
     
  5. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    604
    Thanks much Eric!

    Andres