Search Issue Tracker
Fixed in 2018.2.X
Fixed in 2018.1.X
Votes
13
Found in
2017.3.0b3
Issue ID
958177
Regression
Yes
RectMask2D stops masking, when it's child has a child with Mask and Image components inside the RectMask2d area
It reproduces when UI Object with a "Rect Mask 2D" has a child object (which is not the first child in hierarchy) which also has a Child with Image(script) and Mask(script) components. Also, there must be another UI element on the Canvas, so that object with the "Rect Mask 2D" is not the most bottom child of Canvas.
To reproduce:
1. Open "Test" scene, from "SimplerUiProject.zip"
2. Open Game (or Scene) window and inspect, that RectMask2d is working correctly.
3. In Hierarchy find "Canvas -> RectMask -> Parent_of_Mask" and enable "Parent_of_Mask" object.
Expected result: Enabling this object does not change the way RectMask2d works.
Actual result: RectMask2d is no longer working.
Reproducible: 2017.2.0b6, 2017.2.0f3, 2017.3.0b4, 2018.1.0a1
Not Reproducible: 2017.2.0b5
Workaround:
Make sure Object with RectMask2D is the bottom child in Canvas.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [Particle System] "ParticleSystem.GeometryJob" sometimes takes up to ~20 ms in the worker thread when initializing 5 Particle Systems
- Can't change OpenXR settings when switching Build Profiles
- L(a,b) expression in float fields has erratic behaviour when ordering due to using instanceID as an index
- InvalidOperationException is thrown when switching to a custom Debug Draw Mode in Scene View
- [Android][Vulkan] Skybox and Environment effects flicker in the Player when using the Vulkan Graphics API
nezbo
May 14, 2019 09:45
Unity 2018.3.0f2: Having this issue with RectMask2D in ScrollView and a nested TMP InputField with RectMask2D. Both RectMask2D seem to malfunction with enabled simultaneously.
The proposed fix of calling Shader.EnableKeyword("UNITY_UI_CLIP_RECT") does not seem to work.
tcvpromo
Apr 18, 2019 06:01
2019.1 this bug still reproduced!
In 2018.3 for us helped workaround with "Shader.EnableKeyword("UNITY_UI_CLIP_RECT");", but now this workaround it does not help
btyson_z
Dec 07, 2018 19:35
Can someone please post a complete script with this solution? I'M AN ARTIST. Just need this working for my prototype UI.
iansp
Dec 07, 2018 18:54
Reproducible in 2018.3.b12
Xerioz
Jun 13, 2018 15:36
Also reproducible in Unity 2018.2.0b7.
Xerioz
Jun 13, 2018 15:36
Reproduced in Unity 2018.2.0b6.
RectMask2D + TextMeshPro input field children which use RectMask2D, will bleed out the text outside the mask.
giawa
Jun 06, 2018 18:25
I can still reproduce this issue in Unity 2018.2.0b6 when doing a WebGL build. Shader.EnableKeyword("UNITY_UI_CLIP_RECT"); is a work-around we are currently using, but I don't think this is fixed yet (or there is another similar issue).
Unity 2018.2.0b6 without work-around (incorrect/no masking): https://sadpandastudios.com/unity-bugs/incorrect_masking.png
Unity 2018.2.0b6 WITH work-around (properly masking): https://sadpandastudios.com/unity-bugs/correct_masking.png
Version information from js console: Initialize engine version: 2018.2.0b6 (ac34ff94dd0f)
BalDev
Mar 16, 2018 12:35
BFE_GIO saved us all, this appears to be working:
Shader.EnableKeyword("UNITY_UI_CLIP_RECT");
bfe_gio
Jan 22, 2018 23:40
Dealing with a similar bug in 2017.2.0p2 (in our case the RectMask2D just randomly clips or doesn't clip various things). A workaround that *seems* to be working for us is to call this at startup somewhere:
Shader.EnableKeyword("UNITY_UI_CLIP_RECT");
URoutine
Jan 11, 2018 14:53
Reproduced in 2017.2.0p3