- Home /
Problem with UI Panel Color
Hello. Today I faced really annoying problem which I can't solve by myself, cus I have no idea whats going on.
I am working on inventory GUI system and now I wanted to make Equipment window. Everyting is okey and working well, BUT! My Equipment pannel changing colors randomly by itself! O.o. I found that problem by accident. If I close Inventory Window, Equipment panel change color. Some screens from that strange situation:
Inventory Opened: screen1
Inventory Closed: screen2
Inventory Opened: screen3
Inventory Closed: screen4
I have no idea whats going on. There is no script for changing colors on Equipment Panel, actually, there is NO connection between Inventory & Equipment Pannels.
Can somebody help me solve that strange problem? There is problem if I use too many Pannels in one GameObject?
EDIT! Same situation is when I click on button for generate items to my inventory. Equipment Pannel change color after random number of clicks...
EDIT2! I could solve that by disabling Image component on StatsPanel: screen. Unfortunatelly now I don't have that border. Now I just wonder. Why if I enable it I am facing with so strange problem?
Coud it be that you have several UI elements on top of each others? that's what it looks like.
It is hard to debug this with only screenshot, you should try to make a very simple display that reproduces the bug so we can look into it.
You sure you don't have any scripts/animations playing with the panel colors/alpha?
There is no UI elements on top, I already checked that (thats come to my $$anonymous$$d firstly too). I can't create good debug info cus there is no connection between these pannels. I even deleted all scripts from Equipment Panel to check if it helps but with no success. There is no other script/animation included. Looks like some Unity UI bug. Only deleting Image component on one of Equipment child panel helped.
I am wondering if that could be because of using standart Unity sprite as image. I will create some image as background and post answer if same thing goes there.
Answer by RafiXWPT · Aug 11, 2015 at 10:01 AM
Okey I found answer. There must be something with Unity standart assets. When I downloaded & converted jpg image into Sprite UI and put as background situation seems to be stabilized. There is no changing colors by that panel any more.
Your answer
![](https://koobas.hobune.stream/wayback/20220611235307im_/https://answers.unity.com/themes/thub/images/avi.jpg)