private void SetCell(int r, int c, UITableCell cell) { if (cell != null) { int oldIndex = table.GetIndex(cell); if (oldIndex >= 0) { table.components[oldIndex] = null; } NGUIUtil.DisableAnchor(cell.transform); } table.SetCell(r, c, cell); }
override public void OnInspectorGUI() { bool changed = varInspector.OnInspectorGUI(); if (changed) { NGUIUtil.DisableAnchor(layout.top); NGUIUtil.DisableAnchor(layout.center); NGUIUtil.DisableAnchor(layout.bottom); NGUIUtil.DisableAnchor(layout.left); NGUIUtil.DisableAnchor(layout.right); layout.InvalidateLayout(); EditorUtil.SetDirty(target); } }