public void handle_upgrade(Vector3Int oldCell, Vector3Int newCell) { if ((inverted && newCell.y == 1) || (inverted == false && newCell.y == 8)) { disable_all_piece_colliders(); GameObject upgradeMenuGameObject = Instantiate(upgradeMenuPrefab); upgradeMenu = (UpgradeMenu)upgradeMenuGameObject.GetComponentInChildren(typeof(UpgradeMenu)); upgradeMenu.connectedPawn = this; upgradeMenu.connectButtons(); } }