CanvasGroups Occasionally Won't Draw When Visible

I’ve created an Inventory UI liberally using CanvasGroups for their ease of editing their contents’ transparency. When I came home on Monday after being away since Friday, I began encountering a visual bug I hadn’t seen at all prior where occasionally CanvasGroups that I had tweened visible (GroupTransparency to 0) weren’t drawing until a property of theirs changed.

Here is a video of the phenomenon:

What’s happening in the video: Each of the 4 buttons at the top are their own CanvasGroup that are visible and have a GroupTransparency of 0, but only begin to actually draw (the UIStroke is unaffected) when the white selection vignette child becomes visible when the mouse enters the button… The background, its own CanvasGroup, also doesn’t draw, only drawing when the button menu at the end opens and changes one of its properties, the text subtitle at the bottom.
I’ve included a repro file and instructions for reproducing in the staff-only section.

This is a considerate blocker for me, as UI elements not drawing looks very unpolished and can poorly communicate to the player what items they own.

System Info:
CPU: Intel(R) Core™ i7-10700F CPU @ 2.90GHz
Memory: 32.0 GB
GPU: NVIDIA GeForce RTX 2060

Issue Area: All Platforms
Issue Type: Visual Bug
Impact: Moderate
Frequency: Inconsistent
Date First Experienced: 2023-04-24

A private message is associated with this bug report


After more experimentation, I’ve found that resizing the viewport when CanvasGroups aren’t drawing is another way to force them to draw correctly. I now heavily suspect that this bug is due to the unique Draw Call behavior of CanvasGroups, perhaps a faulty cache.

Here is a video to demonstrate this:

Thanks for the report! We’ll follow up when we have an update for you.


Thanks for the report, do you happen to have a repro file that contains the elements that has drawing issue that we can take a look at?

1 Like

Hi! If you check the private message associated with this devforum post, you’ll see the repro file as well as repro instructions :smile:

I believe this issue is memory related, I’ve done some work to heavily reduce the number of CanvasGroups in use and the issue has almost entirely disappeared