From 78c410766a3a96922c7cd523374eee66aa7f6da0 Mon Sep 17 00:00:00 2001 From: Chris Charabaruk Date: Fri, 21 Aug 2015 22:56:47 -0400 Subject: [PATCH 1/2] reset local scale for overlay and scrollbar on toggle (fixes issue #15) Fixed by @jeffssmith1 https://bitbucket.org/ddreaper/unity-ui-extensions/issues/15#comment-18792458 --- Scripts/ComboBox/DropDownList.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/ComboBox/DropDownList.cs b/Scripts/ComboBox/DropDownList.cs index dc7441a..2475f6b 100644 --- a/Scripts/ComboBox/DropDownList.cs +++ b/Scripts/ComboBox/DropDownList.cs @@ -277,6 +277,8 @@ namespace UnityEngine.UI.Extensions /// whether an item was directly clicked on public void ToggleDropdownPanel(bool directClick) { + _overlayRT.transform.localScale = new Vector3(1, 1, 1); + _scrollBarRT.transform.localScale = new Vector3(1, 1, 1); _isPanelActive = !_isPanelActive; _overlayRT.gameObject.SetActive(_isPanelActive); if (_isPanelActive) From 72914a4791cdc18d6ee8a5f08e94490eb5f44069 Mon Sep 17 00:00:00 2001 From: Chris Charabaruk Date: Fri, 21 Aug 2015 22:58:31 -0400 Subject: [PATCH 2/2] ensure script-added dropdown items appear correctly (fixes issue #20) Fix by @fvangeirt https://bitbucket.org/ddreaper/unity-ui-extensions/issues/20 --- Scripts/ComboBox/DropDownList.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/ComboBox/DropDownList.cs b/Scripts/ComboBox/DropDownList.cs index 2475f6b..66e7f6b 100644 --- a/Scripts/ComboBox/DropDownList.cs +++ b/Scripts/ComboBox/DropDownList.cs @@ -70,7 +70,7 @@ namespace UnityEngine.UI.Extensions } } - public void Awake() + public void Start() { Initialize(); }