If you have several CanvasGroup objects parented to a player’s PlayerGui at once, they’ll render as a blank texture depending on the GroupColor3 if the GroupTransparency is <1.
Attached is a reproduction file where I have 30 ScreenGuis with CanvasGroups cloned into your PlayerGui via a LocalScript. The 31st Gui to be parented will be visible despite having a background transparency of one and nothing parented inside of it. The number of guis required to cause this issue seems dependent on the device.
Resolution: 1920 x 1080 (NOTE: Studio was not fullscreen, so the resolution of the experience-preview was smaller)
This is a problem for my experience because I utilize CanvasGroup for various directional callouts. For users deployed with the Medic class, they have directional callouts for downed allies, and if they get too many their screen is flashbanged and they can’t see at all. Since the experience is a shooter this is a significant issue.
Expected behavior
I expect Roblox to handle an infinite amount of these at once, or at the very least, a more reasonable maximum like 100.
Alternatively, I would expect Roblox to offer better tools to developers so we can determine what “hitting the memory cap” means as the documentation is extremely vague. It makes CanvasGroup objects extremely difficult to work with when people will randomly be unable to render them properly and we as developers do not have the tools to determine when this will happen so we can find workarounds.
What exactly is the memory cap then? How I am I supposed to determine what the max limit is for the amount of them I can have on screen, especially if its based on just the client?
Also, if the BackgroundTransparency is set to 1 shouldn’t it just not render anything at all? It seems to just render the background frame itself (as changing the background color will change what shows up. If the background is green it’ll just render solid green) so shouldn’t it be respecting the background transparency which is separate from the group transparency?
That might not be BackgroundTransparency. If out of memory, CanvasGroups render as a white texture. Set the GroupTransparency to 1 if the “bug” occurs again and see if that proves it.
Upon further investigation you seem to be right, they will simply render as whatever the GroupColor3 is (assuming GroupTransparency <1).
While I’ll edit the bug report to clarify, I’m going to leave it open. I feel like there is a lack of documentation and/or standardization on what is considered “reaching the memory cap”, and the lack of insight we have as developers to work around this issue is uh, not great.
I don’t exactly know how we’re expected to utilize an instance like this if it will seemingly randomly fail on me and cause issues for my players. If they had a property like “ExceededMemoryCap” or something I could look at to identify when the issue is happening then at least I can make workarounds.
The limit would likely be much lower than 100. You have to make a tradeoff, e.g. more convasgroups, less audio etc…
That’s why we don’t provide a hard limit.
So how exactly am I meant to work with these? For some people it seems to be causing issues with as low as 5-10 of them. Is there any way for me to tell if the limit is being hit?
On our side we are working on improving streaming, e.g. reducing your in-world visuals to render more canvas groups. The best thing you can do is exactly what you described: limit yourself to ~10 ish groups being active simultaneously.
Would you and the rest of the team consider adding some sort of property like CanvasGroup.MemoryExceeded that updates true/false depending on if that canvas group is failing to load properly? Having a property like that would greatly improve our ability as developers to work with instances like these.