Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if canvas camera is not set in world space mode, masked contents are not displayed #36

Closed
drdavient opened this issue Mar 8, 2019 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@drdavient
Copy link

Describe the bug

  1. When a worldspace camera is used (rather than screen overlay). The Masked content will reduce in width, height as it approaches (0,0)

  2. If worldspace / screenspace camera are chosen and the camera is set in the canvas. The Mask will display nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Import package attached into project with SofMaskForUGUI installed
    2, Check Scene is working Should see UnityChan SoftMasked in a Star
  2. Move Canvas down and or Left
  3. Unity Chan is cropped as approaching (0,0)
    PositionBug.zip

Environment (please complete the following information):

  • Platform Editor (Windows 10 (x64))
  • Unity: [e.g. 2018.3.7f1
  • SoftMaskForUGUI: [e.g. v0.6.0]

Additional context
Add any other context, screenshots or gif animations about the bug here.

@mob-sakai mob-sakai self-assigned this Mar 8, 2019
@mob-sakai mob-sakai added the bug Something isn't working label Mar 8, 2019
@mob-sakai
Copy link
Owner

Hi @drdavient
Thank you for reporting!

@mob-sakai
Copy link
Owner

mob-sakai commented Mar 11, 2019

Hmm...
I don't understand completely what you mean...

When I load your scene, the "star" mask is flipped, right?
I create a new issue #37.

When a worldspace camera is used (rather than screen overlay). The Masked content will reduce in width, height as it approaches (0,0)
Unity Chan is cropped as approaching (0,0)

Like this? This is expected result.
SoftMaskBuffer is shared in game view and scene view.
Therefore, the result image is cropped in scene view.

@mob-sakai mob-sakai added question Further information is requested and removed bug Something isn't working labels Mar 11, 2019
@drdavient
Copy link
Author

drdavient commented Mar 11, 2019

Your fix to flipping the object is a good one :) (Not what I was reporting though :)

Your scene view observations are correct - though I also get this in the game view. I'm showing this in the attached image.
image

And new demo project (using 0.7.0 now)
SoftMaskCropping.zip

  • Bottom is normal:
    As expected
  • Middle is moving the Canvas towards x=0 (moved left 75 units).
    Imaged is clipped from both sides
  • Top is moving the Panel toward the x=0(moved left 75 units).
    Image is clipped on the left;

@mob-sakai
Copy link
Owner

Thank you very much. 👍
It was really easy to understand and to fix!

I'll release a fixed version, ASAP. :)

@mob-sakai mob-sakai added bug Something isn't working and removed question Further information is requested labels Mar 11, 2019
@mob-sakai mob-sakai changed the title Worldspace Camera doesn't display Masked Content as Canvas approaches position (0,0) if canvas camera is not set in world space mode, masked contents are not displayed Mar 11, 2019
@mob-sakai mob-sakai added this to the v0.7.1 milestone Mar 11, 2019
mob-sakai added a commit that referenced this issue Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants