void RemoveOffsetsAt(int idx)
{
Map m = (Map)target;
int ny = idx/(int)m.size.x;
int nx = idx-(ny*(int)m.size.x);
/* int nz = tiles[idx].z;*/
int nz = editZ;
m.SetTileInvisible(nx, ny, nz, false);
RegisterUndo("Clear Insets");
m.InsetSidesOfTile(nx, ny, nz, 0, Neighbors.All);
m.InsetCornerOfTile(nx, ny, nz, 0, Corners.Left );
m.InsetCornerOfTile(nx, ny, nz, 0, Corners.Front);
m.InsetCornerOfTile(nx, ny, nz, 0, Corners.Right);
m.InsetCornerOfTile(nx, ny, nz, 0, Corners.Back );
EditorUtility.SetDirty(target);
}