Skip to content

fix: refresh material when changing shadow mode - #406

Merged
mob-sakai merged 1 commit into
mob-sakai:developfrom
ZeroGreen86:feature/fix-shadow-mode-material-dirty
Aug 17, 2026
Merged

mob-sakai merged 1 commit into
mob-sakai:developfrom
ZeroGreen86:feature/fix-shadow-mode-material-dirty

Conversation

@ZeroGreen86

Copy link
Copy Markdown
Contributor

Pull Request Template

Description

  • Fix the material not being refreshed when shadowMode changes at runtime between None and an enabled mode such as Outline.
  • Replace the duplicated SetVerticesDirty() call in the shadowMode setter with SetMaterialDirty().
  • This reevaluates the CanvasRenderer material and propagates the material refresh to TMP submesh replicas.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update documentations
  • Others (refactoring, style changes, etc.)

Test environment

  • Platform: Editor (Windows), Standalone (Windows)
  • Unity version: 6000.3.20f1
  • Build options: Built-in Render Pipeline, StandaloneWindows64
  • Validation:
    • All 6 EditMode tests passed, including local regression coverage for dirty callbacks, CanvasRenderer material, and TMP main/submesh material transitions.
    • StandaloneWindows64 player build succeeded.

Checklist

  • This pull request is for merging into the develop branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

@ZeroGreen86
ZeroGreen86 requested a review from mob-sakai as a code owner August 14, 2026 09:55
@mob-sakai
mob-sakai merged commit 8bb782c into mob-sakai:develop Aug 17, 2026
2 of 4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 5.11.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants