Hello,
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.
You can find attached the properties of the game object containing the image.
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 for your help