From 8cad09f35021806ff8b1c3e41f6b0781888e1ed8 Mon Sep 17 00:00:00 2001 From: lrc <571244399@qq.com> Date: Fri, 13 Nov 2026 15:20:00 +0800 Subject: [PATCH] =?UTF-8?q?XChart=20=E5=A1=AB=E5=85=85=EF=BC=9A=E9=A1=B6?= =?UTF-8?q?=E7=82=B9=E9=A2=84=E7=AE=97=E6=8C=89=20UGUI=20=E7=9C=9F?= =?UTF-8?q?=E5=AE=9E=E9=97=A8=E6=A7=9B=2064999?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VertexHelper.FillMesh 的判据是 if (m_Positions.Count >= 65000) throw,能装的是 64999; 预算原来写 65535,65000..65535 这一段每次都会抛 Mesh can not have more than 65000 vertices, 等于整块填充什么都没画。常量与注释按源码 214 行改正。 --- Runtime/XChart/Mesh/XChartMeshFillRenderer.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Runtime/XChart/Mesh/XChartMeshFillRenderer.cs b/Runtime/XChart/Mesh/XChartMeshFillRenderer.cs index c6596be..15e5429 100644 --- a/Runtime/XChart/Mesh/XChartMeshFillRenderer.cs +++ b/Runtime/XChart/Mesh/XChartMeshFillRenderer.cs @@ -26,10 +26,10 @@ namespace XericUI.XChart.Mesh /// /// 顶点预算(纯算,离线可验)。 /// - /// 为什么要有它:UGUI 的 65535 顶点上限是每个 Graphic 各自的 - /// (`VertexHelper.FillMesh` 超了就抛 `Mesh can not have more than 65000 vertices`,他 2026-10-23 - /// 现场中过一次),而有些元素是按记录数长网格的(散点一个点 1 个四边形、圆柱填充一片轮廓) - /// ⇒ 数据一多就会撞。 + /// 为什么要有它:UGUI 的顶点上限是每个 Graphic 各自的,而且门槛是 + /// 65000 不是 65535(`VertexHelper.FillMesh`:`if (m_Positions.Count >= 65000) throw`, + /// 他 2026-10-23 与 2026-11-11 各现场中过一次),而有些元素是按记录数长网格的 + /// (散点一个点 1 个四边形、圆柱填充一片轮廓)⇒ 数据一多就会撞。 /// /// 填充这一侧不分块(2026-11-08 他要求:自己写简单填充,不要那套 chunk 子物体), /// 所以判据从"切成几块"换成"装不下的那部分必须整段放弃、并且必须报出来"—— @@ -37,8 +37,12 @@ namespace XericUI.XChart.Mesh /// public static class XChartMeshBudget { - /// UGUI 每个 Graphic 的硬上限(`VertexHelper.FillMesh` 超过就抛) - public const int GraphicVertexCap = 65535; + /// + /// UGUI 每个 Graphic 的硬上限:`VertexHelper.FillMesh` 的判据是 + /// `if (m_Positions.Count >= 65000) throw`(ugui 1.0.0,VertexHelper.cs:214), + /// 所以能装的是 64999,不是 65535——写 65535 会让 65000..65535 这一段必然抛。 + /// + public const int GraphicVertexCap = 64999; /// /// 按提交顺序能装进 的前缀面数。