Unity Issue Tracker - Color set through CanvasRenderer.SetColor is reset when CanvasRenderer becomes inactive
Fixed
UUM-3527
Color set through CanvasRenderer.SetColor is reset when CanvasRenderer becomes inactive
Unity: uGUI Framework
Fixed
2023.1.X
2022.2.X
2021.3.X
2020.3.X
Fixed in 2023.1.0a3
Removed the color reset in the CanvasRenderer when a uGUI element is disabled, so the color stays when the element is enabled again.
How to reproduce:
1. Open the user's attached project
2. Open scene Scenes/SampleScene
3. Press the Play button
4. In the Game view, click each button in the noted order (Set Color, Disable, Enable)
5. Observe the text in the middle of the Game view
Expected result: white text "Correct" shows up on a red background
Actual result: red text "Incorrect" shows up on a white background