mob-sakai / SoftMaskForUGUI

Enhance Unity UI (uGUI) with advanced soft-masking features to create more visually appealing effects!
https://github.com/mob-sakai/SoftMaskForUGUI
MIT License
2k stars 262 forks source link

SoftMask at wrong position #45

Closed buihuuloc closed 5 years ago

buihuuloc commented 5 years ago

I am using the newest SoftMask version

mob-sakai commented 5 years ago

Hi @buihuuloc

Tell me more information of your project. And, can you submit a screenshot?

buihuuloc commented 5 years ago

It only happens on Android. It works perfectly on iOS. :(

buihuuloc commented 5 years ago

I sent you a video via email

lvictorino commented 5 years ago

Hey there. I don't know if this one has been solved but I think I encountered the same issue. The mask is perfectly fine in Scene view while a tiny offset is visible in Game view. Any idea on what I missed here?

image

Edit: zoom in the screenshot to better see the offset.

mob-sakai commented 5 years ago

Hi @lvictorino Can you submit a small project that can reproduce the issue?

mob-sakai commented 5 years ago

Does the issue also occur in player builds?

lvictorino commented 5 years ago

Hey @mob-sakai while trying to reproduce it in a fresh project, I found the issue. My canvases are all contained in an empty GameObject. That object had a very small offset that was, somehow, applied to the mask position even if the canvas containing the mask is defined as screen overlay. Removing that offset in the parent GameObject fixed it. Sorry for the useless question. I hope it helps.

mob-sakai commented 5 years ago

@lvictorino Thanks!

mob-sakai commented 5 years ago

@lvictorino Please submit a project that can reproduce the issue just in case. :)

lvictorino commented 5 years ago

Here you go. The top object (the one that contains the canvas) is messing everything. If you change the position to zero, everything is back to normal.

image

softmask-test.zip

mob-sakai commented 5 years ago

@lvictorino Thanks to your help, the bug will be fixed. :) image

lvictorino commented 5 years ago

awesome thanks!