Skip to content

Commit

Permalink
fix: material properties do not change when Mask is disabled
Browse files Browse the repository at this point in the history
close #1
  • Loading branch information
mob-sakai committed Jul 1, 2024
1 parent 3a43607 commit 5bd37cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Packages/src/Runtime/UIMaterialPropertyInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ Material IMaterialModifier.GetModifiedMaterial(Material baseMaterial)
var groupId = sharingGroupId != 0 ? sharingGroupId : (uint)pHash.GetHashCode();
var localId = sharingGroupId != 0 ? 0 : (uint)GetInstanceID();
var hash = new Hash128((uint)baseMaterial.GetInstanceID(), groupId, localId, 0);

// If the material has been changed, mark as dirty.
_dirty |= !MaterialRepository.Valid(hash, _material);

MaterialRepository.Get(hash, ref _material, m => new Material(m)
{
hideFlags = HideFlags.DontSave | HideFlags.NotEditable
Expand Down

0 comments on commit 5bd37cd

Please sign in to comment.