diff --git a/.gitignore b/.gitignore index 2bb2d61..2cec082 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ sysinfo.txt *.apk *.unitypackage /.vs + +**/node_modules/* \ No newline at end of file diff --git a/Examples~ b/Examples~ index 774bde7..2b2dba5 160000 --- a/Examples~ +++ b/Examples~ @@ -1 +1 @@ -Subproject commit 774bde78bf8792ad8de1c96ad7e874932fd716d7 +Subproject commit 2b2dba57650838e285c3336b4a26847931462570 diff --git a/README.md b/README.md index c930e2e..454e909 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ In this repository is a collection of extension scripts / effects and controls t You can either download / fork this project to access the scripts, or you can also download these pre-compiled Unity Assets, chock full of goodness for each release: -## [Download - 2019.6 (aka 2.5)](https://unity-ui-extensions.github.io/Downloads) +## [Download Latest - Version 2.3](https://unity-ui-extensions.github.io/Downloads) We have expanded where you can download the UnityPackage asset and widened the options to contribute to the project. diff --git a/Runtime/Scripts/Controls/ColorPicker/Events/ColorChangedEvent.cs b/Runtime/Scripts/Controls/ColorPicker/Events/ColorChangedEvent.cs index 537a86d..2144c6a 100644 --- a/Runtime/Scripts/Controls/ColorPicker/Events/ColorChangedEvent.cs +++ b/Runtime/Scripts/Controls/ColorPicker/Events/ColorChangedEvent.cs @@ -1,9 +1,11 @@ using System; -using UnityEngine; using UnityEngine.Events; -[Serializable] -public class ColorChangedEvent : UnityEvent +namespace UnityEngine.UI.Extensions.ColorPicker { + [Serializable] + public class ColorChangedEvent : UnityEvent + { + } } \ No newline at end of file diff --git a/Runtime/Scripts/Controls/ColorPicker/Events/HSVChangedEvent.cs b/Runtime/Scripts/Controls/ColorPicker/Events/HSVChangedEvent.cs index b7a90d6..d7d573a 100644 --- a/Runtime/Scripts/Controls/ColorPicker/Events/HSVChangedEvent.cs +++ b/Runtime/Scripts/Controls/ColorPicker/Events/HSVChangedEvent.cs @@ -1,6 +1,9 @@ using UnityEngine.Events; -public class HSVChangedEvent : UnityEvent +namespace UnityEngine.UI.Extensions.ColorPicker { + public class HSVChangedEvent : UnityEvent + { -} + } +} \ No newline at end of file diff --git a/Runtime/Scripts/Controls/ComboBox/ComboBox.cs b/Runtime/Scripts/Controls/ComboBox/ComboBox.cs index 094f4aa..78d1346 100644 --- a/Runtime/Scripts/Controls/ComboBox/ComboBox.cs +++ b/Runtime/Scripts/Controls/ComboBox/ComboBox.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; -using static UnityEditor.Progress; namespace UnityEngine.UI.Extensions { diff --git a/Runtime/Scripts/Utilities/ResetSelectableHighlight.cs b/Runtime/Scripts/Utilities/ResetSelectableHighlight.cs index 19b9590..5f4c647 100644 --- a/Runtime/Scripts/Utilities/ResetSelectableHighlight.cs +++ b/Runtime/Scripts/Utilities/ResetSelectableHighlight.cs @@ -1,29 +1,24 @@ /// Credit SimonDarksideJ +using UnityEngine.EventSystems; + namespace UnityEngine.UI.Extensions { - /* - Handy Selectable script to un-highlight a selectable component in Unity (e.g. a Button) when the user moves away from it, EVEN IF the user has holding a button on it. - - Resolves the situation where Unity UI Components remain in a highlighted state even after the pointer has moved away (e.g. user holding a button, mouse, pointer down). - Now whenever the cursor leaves the component, it will force the UI component to revert to un-highlighted. - */ - - using UnityEngine; - using UnityEngine.EventSystems; - using UnityEngine.UI; - + /// + /// Handy Selectable script to un-highlight a selectable component in Unity (e.g. a Button) when the user moves away from it, EVEN IF the user has holding a button on it. + /// Resolves the situation where Unity UI Components remain in a highlighted state even after the pointer has moved away (e.g. user holding a button, mouse, pointer down). + /// Now whenever the cursor leaves the component, it will force the UI component to revert to un-highlighted. + /// [AddComponentMenu("UI/Extensions/ResetSelectableHighlight", 31)] [RequireComponent(typeof(Selectable))] public class ResetSelectableHighlight : MonoBehaviour, IPointerExitHandler { [SerializeField] - private Selectable attachedSelectable; + private Selectable attachedSelectable = null; - // Start is called before the first frame update - void Awake() + private void Awake() { - if (!attachedSelectable) + if (attachedSelectable == null || !attachedSelectable) { attachedSelectable = GetComponent(); } @@ -31,7 +26,12 @@ namespace UnityEngine.UI.Extensions public void OnPointerExit(PointerEventData eventData) { + if (!attachedSelectable.interactable) + { + return; + } + attachedSelectable.targetGraphic.CrossFadeColor(attachedSelectable.colors.normalColor, 0f, true, true); } } -} \ No newline at end of file +} diff --git a/Runtime/Scripts/Utilities/TestCompression.cs b/Runtime/Scripts/Utilities/TestCompression.cs index 6411dfc..2ae22a9 100644 --- a/Runtime/Scripts/Utilities/TestCompression.cs +++ b/Runtime/Scripts/Utilities/TestCompression.cs @@ -1,14 +1,17 @@ -using UnityEngine; +namespace UnityEngine.UI.Extensions +{ + public class TestCompression : MonoBehaviour + { + // Use this for initialization + void Start() + { -public class TestCompression : MonoBehaviour { + } - // Use this for initialization - void Start () { - + // Update is called once per frame + void Update() + { + + } } - - // Update is called once per frame - void Update () { - - } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 1764052..c1c4ec2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.uiextensions", "displayName": "Unity UI Extensions", - "version": "2.3.0", + "version": "2.3.1.pre.1", "description": "An extension project for the Unity3D UI system, all crafted and contributed by the awesome Unity community", "author": "Simon darkside Jackson <@SimonDarksideJ>", "contributors": [