Unity3d | uGUI custom RectMask2D script, that allow to disable Culling / Softness for better performance
Built-in RectMask2D has overhead, that grow linearly with count of active Child UI.Graphic, main reason for this - Culling. When all this UI.Graphic is always visible ( or used, for example) - Culling is useless
And you can't disable it
Inherite from RectMask2D and add flags to disable Culling
-
Profiled at Honor 10X Lite
-
50 child TextMeshPro
-
400 child other various UI.Graphic (UI.Image, UI.RawImage, UI.Text)
-
RectMask2DCulling use reflection to get private properties of parent RectMask2D class, and it add performance overhead