RectClip on materials clip out parts of any mesh based on a rectangular section of the UV coordinates. It is defined by 4 floating point rect values:
XMin
YMin
XWidth
YWidth
These actually aren't exactly the 0-1 range of UVs, but it is defined where the bottom left corner which would be UV <0,0>
is actually <-1,-1>
and the top right is <1,1>
. So for example if you were to represent the full UV range you would use a rect <-1, -1, 2, 2>
, since the distance from -1 to 1 is 2.
For the UI_UnlitMaterial specifically, whenever you put it into a UIX element, its parameters become controlled by it internally. This includes the FillRect
parameter on the UIX Image
component which is under utilized and allows you to clip part of the canvas to a specific region. There is an inconsistency in its usage though as the Image
's rect actually acts in the 0-1 range as you would normally expect.