Skip to content

Commit

Permalink
fix: remove warn CS0618
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Feb 27, 2025
1 parent 02cf054 commit 04f587c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Packages/src/Runtime/Utilities/SoftMaskUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,17 @@ public static void UpdateMeshUI(Object obj)

if (text.TryGetComponent<SoftMask>(out var sm))
{
#pragma warning disable CS0618
(sm as IMeshModifier).ModifyMesh(text.mesh);
#pragma warning restore CS0618
UpdateSubMeshUI(text, sm.enabled, sm.showMaskGraphic, sm.antiAliasingThreshold, sm.softnessRange,
MaskingShape.MaskingMethod.Additive);
}
else if (text.TryGetComponent<MaskingShape>(out var ms))
{
#pragma warning disable CS0618
(ms as IMeshModifier).ModifyMesh(text.mesh);
#pragma warning restore CS0618
UpdateSubMeshUI(text, ms.enabled, ms.showMaskGraphic, ms.antiAliasingThreshold, ms.softnessRange,
ms.maskingMethod);
}
Expand All @@ -139,7 +143,9 @@ private static void UpdateSubMeshUI(TextMeshProUGUI text, bool enabled, bool sho
maskingShape.antiAliasingThreshold = aa;
maskingShape.softnessRange = softness;
maskingShape.showMaskGraphic = show;
#pragma warning disable CS0618
(maskingShape as IMeshModifier).ModifyMesh(subMeshes[i].mesh);
#pragma warning restore CS0618
}

InternalListPool<TMP_SubMeshUI>.Return(ref subMeshes);
Expand Down

0 comments on commit 04f587c

Please sign in to comment.