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

[Editor] Visual bug with ScreenSpaceCamera canvas and rotating the camera around #78

Closed
maskedmouse opened this issue Apr 29, 2020 · 7 comments
Assignees
Labels
bug Something isn't working released on @preview

Comments

@maskedmouse
Copy link

Describe the bug
In Editor when rotating the camera the softmask is kind of following around. as if it is not updated every frame but is behind a few frames.

To Reproduce
Steps to reproduce the behavior:

  1. Create a canvas with ScreenSpaceCamera
  2. Create a GameObject with a circle image and a SoftMask
  3. Create a child with an image, set color to red and add SoftMaskable
  4. Go into playmode
  5. Rotate the camera
  6. Observe the red color folowing around instead of being steady

Environment (please complete the following information):

  • Platform: Editor (WebGL target)
  • Unity: 2019.3.11f1
  • SoftMaskForUGUI: 0.9.1 [#upm branch]

Additional context
Unity-2019 3 11f1-SoftMask-Bug

I used an online mp4 to gif so the quality is bad but you can still see the effect I'm having in the editor.
I've got a script attached to the camera so that whenever I'm dragging around it will rotate. The camera itself stays on position 0,0,0. It just rotates around.
Not a 100% sure if this also happens in a build but it seems to be more steady in a webgl build. It's not super noticeable as in the Editor.

@mob-sakai
Copy link
Owner

mob-sakai commented Apr 30, 2020

@maskedmouse
Thank you for the report!
Could you please attach a minimal project that reproduces this issue?

@maskedmouse
Copy link
Author

Here's a zip containing a minimal project.
https://maskedmous.stackstorage.com/s/rutdEowxbi3gWi5

Go into play mode and use left mouse button to rotate the camera around

@mob-sakai
Copy link
Owner

Thank you, it is reproduced.
Honestly, I don't know how to solve it... X(

It seems to be stable when you operate the camera with inspector view.

@maskedmouse
Copy link
Author

Well in a build it doesn't really seem to happen. So it is not a critical issue. But it does make me wonder, if the code under #if UNITY_EDITOR is causing the problem. I haven't gone through the script thoroughly to understand its behaviour. But since it runs well outside of the editor then there's a likely chance that there is a problem in the editor only code.

@mob-sakai mob-sakai added the bug Something isn't working label Apr 30, 2020
@mob-sakai mob-sakai self-assigned this Apr 30, 2020
@mob-sakai
Copy link
Owner

@maskedmouse
You're right.
Perhaps there is a problem with the code for the editor.

@mob-sakai
Copy link
Owner

WIP: I've solved it.

github-actions bot pushed a commit that referenced this issue May 3, 2020
# [0.10.0-preview.2](v0.10.0-preview.1...v0.10.0-preview.2) (2020-05-03)

### Bug Fixes

* visual bug with ScreenSpaceCamera canvas on editor ([482b967](482b967)), closes [#78](#78)
github-actions bot pushed a commit that referenced this issue May 3, 2020
# [0.10.0-preview.2](v0.10.0-preview.1...v0.10.0-preview.2) (2020-05-03)

### Bug Fixes

* visual bug with ScreenSpaceCamera canvas on editor ([482b967](482b967)), closes [#78](#78)
@github-actions
Copy link

github-actions bot commented May 3, 2020

🎉 This issue has been resolved in version 0.10.0-preview.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released on @preview
Projects
None yet
Development

No branches or pull requests

2 participants