public void OnDropdownButtonClicked() { if (DropdownMenu == null) { return; } var menuPosition = new Vector2(layout.xMin, layout.center.y + 2); menuPosition = parent.LocalToWorld(menuPosition); var menuRect = new Rect(menuPosition, Vector2.zero); DropdownMenu.DropDown(menuRect); }