I use Unity 2021.
There is a canvas on the screen. There is a “window” on the canvas - an object containing the components Image (window picture), Canvas Group, Canvas Renderer.
Showing and hiding a window is done by changing the transparency CanvasGroup. This ensures a smooth display of the window.
Here is the code to hide the window
// We hide the window. Once hidden, we disable the object.
gameWindow.GetComponent<CanvasGroup>().DOFade(0, animationDuration)
.OnComplete(() =>
{
gameWindow.SetActive(false);
});
The window has buttons, pictures and various elements.
There is an element on the window SkeletonGraphic (Unity UI Canvas). This is a hero animation.
When hiding a window, the hero's animation flashes. It is something like a highlight of the contour, coloring the animation white and a flash.
No window element behaves this way - only SkeletonGraphic (Unity UI Canvas).
How can this be fixed?