UI Content Size Filter analog?

Content Size Filter (Unity)

The task is simple: there is text that automatically changes its size using auto width - I need to make a background for it (or perhaps for several elements) which accordingly also expands to cover child elements.


Judging by what I read about layout elements in playcanvas - there the parent element controls the children, but there are no tools for the reverse?

Is there any clean solution for this? Or is it necessary to do manipulations from the code?

I achieved what I needed by creating a separate layer “UI-Background” (the order of which is set so that it is drawn under the UI) and placing the background element with this layer as a child of the text element.

Don’t forget to set the display of this new layer in the camera settings.