Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GUI.backgroundColor not changing all gui background elements color !!!

Discussion in 'Editor & General Support' started by Roidz99, Apr 9, 2013.

  1. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    Hey all,

    I've run into a bug with GUI.backgroundColor i think.

    Previously in unity3.5 i've used 'GUI.backgroundColor' to set the background color of all gui elements of my skin.
    This worked fine.

    Now to my surprise i tried this skin with the same code in unity 4.1.2f1 and now not all elements changed color !

    I've made a unity package file and opened it in a new scene in unity 3.5 and in 4.1.2f1 to make sure i didn't screwed it up somewhere.

    in unity 3.5 ---> all colors change fine
    in unity 4.1.2f1 ---> not all colors change (in my skin it didn't change color in: "verticalscrollbar","verticalscrollbarthumb" and the button hover over image,there is no normal button image)

    I attached a screenshot of the gui menu ,you can clearly see the hover over button and the vertical scrollbar has not been affected by the color.

    This is quiet important for us because we ship this skin with our product soon and this will delay that.

    Any help is appriciated !
     

    Attached Files:

  2. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Perhaps something went wrong when importing into Unity 4 (it often is). Did you try to re-import all?
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The entire OnGUI system was re-written in C++ for Unity 4, so it's not surprising that a bug or two might have been introduced. The best thing would be to make a small repro project and submit it as a bug.

    --Eric
     
  4. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    This is a very very valuable information.
     
  5. Deleted User

    Deleted User

    Guest

    I had the same issue when trying to color button in a custom inspector, I was forced to do one thing, put a GUI.backgroundColor = Color; up every button I have, it works ok for me as I have to color only 3 buttons, but maybe for your case is too much, but give it a try.

    Hope you manager to solve it, can't wait to see your cInput update.
     
    Last edited by a moderator: Apr 15, 2013
  6. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    i submitted this bug to unity and they accepted it and were able to reproduce it. They can't give a timeframe on the fix tough.

    Neurological, i will try what you mentioned and reply back later to see if that would work.

    EDIT : this seems to work ! awesome neurological !
     
    Last edited: Apr 19, 2013
  7. Deleted User

    Deleted User

    Guest

    Awesome, still would be good doing it the old way, but until isn't fixed we can just force it I guess.
     
  8. gabriel-diquinzio

    gabriel-diquinzio

    Joined:
    Nov 3, 2015
    Posts:
    3
    2019 still buggy