mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 18:02:38 +08:00
fix: setting gradationScale to 0 throws DivideByZeroException
This commit is contained in:
@@ -1263,6 +1263,7 @@ namespace Coffee.UIEffects
|
|||||||
get => m_GradationScale;
|
get => m_GradationScale;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
value = Mathf.Clamp(value, 0.01f, 10f);
|
||||||
if (Mathf.Approximately(m_GradationScale, value)) return;
|
if (Mathf.Approximately(m_GradationScale, value)) return;
|
||||||
context.m_GradationScale = m_GradationScale = value;
|
context.m_GradationScale = m_GradationScale = value;
|
||||||
SetMaterialDirty();
|
SetMaterialDirty();
|
||||||
|
|||||||
Reference in New Issue
Block a user