diff --git a/Packages/src/Runtime/UIEffectBase.cs b/Packages/src/Runtime/UIEffectBase.cs index 06c5642..f1a3fba 100644 --- a/Packages/src/Runtime/UIEffectBase.cs +++ b/Packages/src/Runtime/UIEffectBase.cs @@ -56,7 +56,7 @@ protected override void OnEnable() if (graphic is TextMeshProUGUI) { _prevLossyScaleY = transform.lossyScale.y; - UIExtraCallbacks.onAfterCanvasRebuild += CheckSDFScaleForTMP; + Canvas.willRenderCanvases += CheckSDFScaleForTMP; UIExtraCallbacks.onScreenSizeChanged += SetVerticesDirtyForTMP; } #endif @@ -69,8 +69,8 @@ protected override void OnEnable() protected override void OnDisable() { #if TMP_ENABLE + Canvas.willRenderCanvases -= CheckSDFScaleForTMP; UIExtraCallbacks.onScreenSizeChanged -= SetVerticesDirtyForTMP; - UIExtraCallbacks.onAfterCanvasRebuild -= CheckSDFScaleForTMP; #endif MaterialRepository.Release(ref _material);