This is a very quick update to try and get SpriteMask to work during convert to sprite, if it's on a child GameObject. During convert to sprite, shapes are rendered one at a time, and prior to this only the shape currently being rendered was on a layer visible to the camera, so anything else in the hierarchy would not affect the render. This change makes it so the entire hierarchy is on the correct layer, but graphics components are disabled except for the shape being rendered. Barely tested and not tested at all with UI.
Before merging this would need some cleanup to factor with DisableUIGraphics(). Also, if a SpriteMask component is on a child but the child doesn't have a Shape component, it won't affect the png.
This is a very quick update to try and get SpriteMask to work during convert to sprite, if it's on a child GameObject. During convert to sprite, shapes are rendered one at a time, and prior to this only the shape currently being rendered was on a layer visible to the camera, so anything else in the hierarchy would not affect the render. This change makes it so the entire hierarchy is on the correct layer, but graphics components are disabled except for the shape being rendered. Barely tested and not tested at all with UI.
Before merging this would need some cleanup to factor with DisableUIGraphics(). Also, if a SpriteMask component is on a child but the child doesn't have a Shape component, it won't affect the png.