Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

itch.ioitch.io logo & titleitch.io logo

Browse GamesGame JamsUpload GameDeveloper LogsCommunity
Log inRegister
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Super Text Mesh

Text for Unity, Super-Powered! · ByKaiClavier

Add to collection
Unity AssetCommunityDevlog

Mask Mode Inside seems to use wrong stencil values, becomes invisible when Mask is enabled

Version: 1.13.5
Unity: 2022.3.55f1

I found an issue where when I have a bunch of STMs in hierarchy branch A, and I enable a Mask object in hierarchy branch B, the STMs in branch A become invisible. Looking at the frame debugger, it's using StencilOp Equal on the objects in branch A, which is incorrect since the Mask is in branch B, and other UI objects in branch A use StencilOp Always and are not affected by the Mask.

Right now I'm using Mask Mode Ignore as a workaround, but I'd like this to work more like other UI objects in the hierarchy. Any ideas?

Example hierarchy with A and B children of the same Canvas:
Canvas > A > [STM1, STM2, STM3]
Canvas > B > Image+Mask

I'll give this a look over the weekend!

I believe I'm in the middle of changing some code related to mask modes but something like *this* is really odd... It might have to do with how I'm caching materials...? I may not be checking if the mask value is the same with material caches (STM will have two objects share a material if the base material, font, and filter mode are the same), so that could cause this to trip up! Does the error still happen if the STM objects in hierarchy branch A are given a different font? This would basically confirm that this is the issue for me!

Our builds are slow and I don't have time to test that rn but I'll let you know if I get the chance to! In this case all the texts were using the same font, so it's likely.

Ok, reviewing this part of my code, and while I did attempt to compare masking values, I think I made a couple mistakes. 1. I'm comparing the ui stencil depth as a float instead of an int... 2. The "_Stencil" or "stencil ID" value I think would be a better comparison to make in this situation.

I think that change *should* fix this, but I'm also currently cleaning up the code in that area a little bit, right now. There could be something else I'm forgetting, too.


If you want to give a build with this change a shot, send me an email though my website!

Log in to reply Join the discussion. Log in or create a free itch.io account to continue.
itch.io on Twitteritch.io on Facebook
AboutFAQBlogContact us
Copyright © 2025 itch corp ·Directory ·Terms ·Privacy ·Cookies

[8]ページ先頭

©2009-2025 Movatter.jp