void RemoveCell(DeviceTableCell toBeRemoved) { toBeRemoved.transform.SetParent(null); toBeRemoved.gameObject.SetActive(false); Destroy(toBeRemoved.gameObject); //TODO: do the things with content view so it adjust it's size }
// Start is called before the first frame update void Start() { var homeCtrl = FindObjectOfType <HomeViewCtrl>(); backBtn.onClick.AddListener(() => { StopScanning(); homeCtrl.SendViewAway(this.transform); }); prototypeCell = GetComponentInChildren <DeviceTableCell>(); cellsContainer = prototypeCell.transform.parent; prototypeCell.gameObject.SetActive(false); }