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

NullReferenceException when adding SoftMask component #160

Open
CDTR-MattConroy opened this issue Oct 6, 2023 · 0 comments
Open

NullReferenceException when adding SoftMask component #160

CDTR-MattConroy opened this issue Oct 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@CDTR-MattConroy
Copy link

CDTR-MattConroy commented Oct 6, 2023

Describe the bug
When adding a SoftMask component to an empty GameObject, NullReferenceExceptions are continuously thrown until a Graphic is also added.

To Reproduce
Steps to reproduce the behavior:

  1. Create an empty GameObject
  2. Add a SoftMask component
  3. See error in console

Expected behavior
No errors are thrown when adding a SoftMask component.
Either a default Graphic should be added if required (during Reset or OnValidate), or ideally, handle missing Graphic components.

Environment (please complete the following information):

  • Version: 1.0.2
  • Platform: Editor(Windows)
  • Unity version: 2022.3.9f1

Additional context

NullReferenceException: Object reference not set to an instance of an object
Coffee.UISoftMask.SoftMask.UpdateMaskTextures () (at ./Library/PackageCache/com.coffee.softmask-for-ugui@1.0.2/Scripts/SoftMask.cs:476)
UnityEngine.Canvas.SendWillRenderCanvases () (at <836aea33117647b388cc5f48bed669c4>:0)
@CDTR-MattConroy CDTR-MattConroy added the bug Something isn't working label Oct 6, 2023
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