表格:编辑器模式不再把运行时布局写成预制体覆盖
- 生成物 hideFlags 增加 NotEditable:编辑期的自动改动不会被记成预制体覆盖。 - 域重载后按名字收养已存在的 _TableBackground/_TableBorders(普通字段为 null,DontSave 的 对象还活着),否则每次重载都会再叠一层。 - content 与冻结容器的尺寸/位置改用 DrivenRectTransformTracker 写入,值每次重算、不落序列化。
This commit is contained in:
@@ -96,8 +96,13 @@ namespace XericUI.XTable.Rendering.Component
|
||||
float pad = m_ContentOffset * 2f;
|
||||
|
||||
if (m_ScrollRect != null && m_ScrollRect.content != null)
|
||||
{
|
||||
// content 属于预制体:用驱动属性写入,值每次刷新重算、不落序列化,
|
||||
// 编辑模式也就不会把表尺寸记成预制体修改。
|
||||
m_LayoutDriven.Add(this, m_ScrollRect.content, DrivenTransformProperties.SizeDelta);
|
||||
m_ScrollRect.content.sizeDelta = new Vector2(
|
||||
m_TotalWidth + pad, m_TotalHeight + pad);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVisibleRect()
|
||||
|
||||
Reference in New Issue
Block a user