-1

I'm using the last beta version of Unity (2018) and I have an issue to change the color of an Image in my prefab.

I'm using my prefab "A" in 2 situations. The first time it works, then I load/destroy other prefabs and load my prefab "A" again and it doesn't work anymore. I can't understand why, Unity doesn't give me any error. Step by step debugging doesn't seem to indicate anything wrong. I can't really describe everything I do between the 2 calls (activate/deactivate prefabs/gameobjects, call functions in external DLLs ...). When I tried 2 days agothe step by step debugger was making Unity crash on that line. It's fine now but the color is not changing.

my code is just :

this.backgroundImage.color = this.ColorRowHover;

where backgroundImage is an Image in a GameObject (not containing or linked to the current game object, it's just a reference to another Image). and ColorRowHover is just a color. This code is called in the OnPointerEnter.

The properties of the game object containing the image : enter image description here

The color is not changing, and if I try to change it in the inspector it's not changing as well. I pick the color and it's not updating the property in the inspector nor on the display.

Do you guys have any idea what could be the issue here ? Or how to find more clues to debug this ?

To be more complete : My game object has a OnPointerEnter so that everytime the mouse enters that object a whole row behind will change color.

Thank you,

user2088807
  • 1,378
  • 2
  • 25
  • 47

1 Answers1

1

Your color seems transparent. And I think your alpha value is 0.

Jamshaid Alam
  • 515
  • 1
  • 9
  • 24