fix: UIEffect with TextMeshPro SubMeshUI appears black in the editor when saving assets

This commit is contained in:
mob-sakai
2025-03-11 19:42:14 +09:00
parent 045db9c3b7
commit de918718d0
@@ -226,9 +226,19 @@ namespace Coffee.UIEffects
.Concat(Misc.GetAllComponentsInPrefabStage<UIEffectBase>()))
{
c.ReleaseMaterial();
c.SetMaterialDirty();
}
}
// Refresh all UIEffect instances.
EditorApplication.delayCall += () =>
{
foreach (var c in Misc.FindObjectsOfType<UIEffectBase>()
.Concat(Misc.GetAllComponentsInPrefabStage<UIEffectBase>()))
{
c.SetMaterialDirty();
c.SetVerticesDirty();
}
};
}
}
#endif