Skip to content

Attempt to make SpriteMask on child GameObjects work during PNG render - #22

Open
all-iver wants to merge 2 commits into
masterfrom
sprite_mask_on_child
Open

Attempt to make SpriteMask on child GameObjects work during PNG render#22
all-iver wants to merge 2 commits into
masterfrom
sprite_mask_on_child

Conversation

@all-iver

@all-iver all-iver commented Feb 13, 2023

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant