Makes total sense as per my FYI below. Should be an easy fix once I can reproduce it.
Do you have layout components in there in addition to some RectMask2D?
Can you provide an example of simple UI setup that reproduces the issue?
I’ll publish the code changes later tonight or more than likely release Preview 12 which will include this fix plus another minor one related to Raycast Targets sync on sub mesh objects.
FYI: If your workflow involves disabling canvases, be mindful that when a Canvas is disabled in the UI System, checking the canvas property of UI Elements that derive from Graphic which is most of them, will return null although the canvas is still there.
I am assuming that you have some RectMask2D somewhere as parent of the text object throwing this error. Correct?
I need some repro project to be able to reproduce this. Can you please submit a bug report with the project and steps to reproduce?
I would like to get this addressed quickly for Preview 12 which I would like to release over the weekend.
P.S. Adding a null check in the GetCanvasSpaceClippingRect() would likely resolve the issue but before doing so, I would still like to be able to reproduce the behavior in case it reveals some other potential issue.
that’s great, I don’t see the issue immediately reproducing now! is it recommended that we use the GUIID version remapping tool? if going from preview 8 to preview 12?
The remapping tool was only needed / used when migrating from Legacy versions from the AssetStore that predated the introduction of the Package Manager in 2018.x.
Can you please submit a bug report on this or provide me with the steps to reproduce this behavior?
I now suspect this occurs when using nested canvas along with a RectMask2D somewhere in that hierarchy and maybe the root or child canvas being disabled.
P.S. Please make the following changes and let me know if the issue still occurs.
@Stephan_B Hi, I tested a new package (preview 14 2.1.0) and now I have a new issue for example when I use sprite in TextMeshPro - Text(UI) I have a lot of extra space around in the label it happens also for texts without sprites. Do you know what causes this issue? works fine on previous packages