mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-21 18:42:37 +08:00
fix: fix a potential ArgumentOutOfRangeException that could occur when changing the FontAsset in TextMeshPro
close #327
This commit is contained in:
@@ -115,7 +115,8 @@ namespace Coffee.UIEffectInternal
|
|||||||
normals.GetOrDefault(i), tangents.GetOrDefault(i));
|
normals.GetOrDefault(i), tangents.GetOrDefault(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < indexCount - 2; i += 3)
|
var count = Mathf.Clamp(indexCount, 0, indices.Count);
|
||||||
|
for (var i = 0; i < count - 2; i += 3)
|
||||||
{
|
{
|
||||||
dst.AddTriangle(indices[i], indices[i + 1], indices[i + 2]);
|
dst.AddTriangle(indices[i], indices[i + 1], indices[i + 2]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user