private void DetermineDropDownPosition() { // DETERMINE IF THE DROPDOWN LISTBOX EXTENDS BEYOND THE BOUNDARIES OF THE SCREEN // IF SO, MOVE LISTBOX ABOVE THE DDL CONTROL. OTHERWISE, LEAVE IT BELOW THE DDL CONTROL. if (DdlListBox == null) { return; } if (!IsOverflowing(DdlListBox.gameObject)) { return; } RectTransform rt = DdlListBox.GetComponent <RectTransform>(); Vector3 v3Pos = rt.position; Vector2 v2Size = rt.sizeDelta; float fThisSize = this.GetComponent <RectTransform>().sizeDelta.y; float fNewPos = v3Pos.y + v2Size.y + fThisSize + (DdlListBox.Spacing * 2); v3Pos.y = fNewPos; DdlListBox.GetComponent <RectTransform>().position = v3Pos; }