public Grid3DDTO(Grid3D grid) { _type = grid.GetTypeGrid(); _name = grid.name; _size_cell = grid.SizeCell; _gap = grid.GapRatio; _map = new List <CellDTO>(); Dictionary <Vector3Int, Cell> .Enumerator it = grid.GetEnumerator(); while (it.MoveNext()) { CellDTO dtocell = new CellDTO(it.Current.Value); _map.Add(dtocell); } }