public void CleanField() { Cells = new List <Cell>(); EmptyCells = new List <Cell>(); if (field) { Destroy(field.gameObject); } field = new GameObject().transform; field.name = "field"; field.transform.position = new Vector3(-1, 0, -1); BonusParent = new GameObject().transform; BonusParent.name = "bonusParent"; BonusParent.transform.parent = field; floorParent = new GameObject().transform; floorParent.name = "floorParent"; floorParent.transform.parent = field; foodParent = new GameObject().transform; foodParent.name = "foodParent"; foodParent.transform.parent = field; innerWallsParent = new GameObject().transform; innerWallsParent.name = "innerWallsParent"; innerWallsParent.transform.parent = field; outerWallsParent = new GameObject().transform; outerWallsParent.name = "outerWallsParent"; outerWallsParent.transform.parent = field; _enemySpawner.Clean(); }