Search Unity

How can i bring the Colorbox in unity

Discussion in 'Scripting' started by Alexander21, Aug 22, 2017.

  1. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    302
    Hi All

    In my project When i click the button the Default Color Box should comes. and i have to choose the color and then the button color should change.

    I dont want new color box. I have to use the existing color box of the unity. How can i bring that.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
  3. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    302
    Thanks Karl_jones For your Reply. How can i use this.How can i call through scripting.. Color Box Should apply. I want simple coding. to use the existing color box.
     
  4. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    302
    Hi is it possible to use this command EditorGUI.ColorField in function
    for eg:
    if (buttonNo==1)
    EditorGui.ColorField
    Then the Color Box Will Populate ...
     
  5. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    You want to use the Unity Editor's color picker in your game? No, you can't do that.
     
    karl_jones likes this.
  6. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    302
    Thanks KelsoMRK For You Reply. How can i bring the color Box. Is there no simple coding to bring color box? in unity.
     
  7. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    I think this is what you're looking for: