- Home /
Sprites Mask with Custom Range not working after build
I'm using multiple masks in my game so I have to use the Custom Range setting, and they where working fine until now :/ Every mask is still working in editor, and I get no error in editor and in the build, idk what's happening
I'm experiencing the same issues with sprite mask custom ranges whose GameObject is packed into an AssetBundle. When loading and instantiating from that AssetBundle, even within the Editor's Play $$anonymous$$ode, I can see that the custom range front and back sorting layers are set back to Default for some reason. The order in layer value is preserved as expected though.
I'll report this bug to Unity and use a temporary workaround for now that sets the sorting layers via code at runtime.
Answer by dushukai · Feb 07, 2021 at 12:26 AM
I had this issue before. Seems it is related to the mask custom range. For example if my target order in layer is 99, then I have to set the range as [98,100]
If I set the range as [98,99], the editor works fine, but the build shows no effect.
Your answer
Follow this Question
Related Questions
Deform sprite using SkinnedMeshRenderer 0 Answers
Alpha masking multiple 2D Sprite GameObjects with 1 Sprite GameObject 0 Answers
How to mask sprites in 4.3? 2 Answers
Sprite Masks not working in Build 0 Answers
Crop/Mask a Sprite on runtime 0 Answers