Issues with CanvasGroup after adjusting size

In one of my projects, I use CanvasGroups to display UI elements correctly without having to use the ClipsDescendants property for other objects. I found out that if you were to adjust the size of one CanvasGroup and equate the scale and offset property of either x-axis or y-axis, optionally both, to 0, you would go through some issues resizing it to other positive values.

Reproduction Steps

  1. Create two CanvasGroup classes under the same screen UI and make their size properties equal to one another. Optionally, one’s BorderSize that’s set to a higher value to observe.
  2. Set one’s size to {0, 0}, {0, 0} and don’t adjust the other one.
  3. Try other positive values for both CanvasGroups other than you did in the first step above. It may end up facing different technical issues.

Expected Behavior

CanvasGroups to act like how they did before one of the dimensions of their size is set to 0 entirely.

Repro.rbxl (47.4 KB)

Actual Behavior

They do not render properly if the size gets set to 0.

Workaround

If the studio is restarted or the parent of CanvasGroup is changed temporarily in-game, it works as anticipated.

Issue Area: Studio
Issue Type: Display
Impact: Moderate
Frequency: Constantly

8 Likes

We’ll follow up when we have an update for you.

5 Likes

Has there been any progress on this issue? I’ve just stumbled upon the exact same problem and it’s incredibly annoying.

Edit: In my particular use case, simply changing Udim2 value from (0,0,0,0) to (0,0.01,0,0.01) has seemed to have solved the issue, however I can image situations where that’s not an option.

2 Likes

This problem still exists. Any update? Seems like it might have gone under the radar.

2 Likes

Hey, can still confirm that this issue exists. Any updates?

1 Like

Hey, one of the developers I work with actually found a solution to this. Of course, this doesn’t solve the actual engine bug, but it’s a simple and useful band-aid.

You can change the parent of the Canvas Group to the Player Gui and then reparent it to the original. This will sorta, refresh the Canvas Group and make its contents visible again. You can see an example of this below.

Super_Simple_Obby_Source_-_Roblox_Studio-05-28-24_08-03-49

2 Likes

Hey do you guys have an update on this?

Just ran into this issue myself when creating a CanvasGroup adornee’d to a part, and scaling it to UDim2.fromScale(0, 0).

Can confirm, have worked on a bunch of UI commissions designing → importing → scripting, and I have been having a lot of issues regarding canvasgroups not rendering after being scaled down to (0, 0).

Really would like a fix to this as it has been affecting some of my workflow.

Hi, we just rolled out a fix for this issue, do you mind checking again? Thanks

From some quick testing, it seems to have been resolved, thank you! I haven’t been particularly rigorous, so maybe check what others have to say too.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.