commit
bc8a187dbb
|
@ -105,9 +105,9 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
if (GUILayout.Button("Reference CUI component for curves"))
|
||||
{
|
||||
Undo.RecordObject(script, "Reference Reference CUI");
|
||||
Undo.RecordObject(script.RefCurves[0], "Reference Reference CUI");
|
||||
Undo.RecordObject(script.RefCurves[1], "Reference Reference CUI");
|
||||
Undo.RecordObject(script, "Reference CUI");
|
||||
Undo.RecordObject(script.RefCurves[0], "Reference CUI");
|
||||
Undo.RecordObject(script.RefCurves[1], "Reference CUI");
|
||||
EditorUtility.SetDirty(script);
|
||||
|
||||
script.ReferenceCUIForBCurves();
|
||||
|
@ -115,7 +115,7 @@ namespace UnityEngine.UI.Extensions
|
|||
script.Refresh();
|
||||
}
|
||||
|
||||
EditorGUILayout.HelpBox("Auto set the curves' control points by refencing another CUI. You need to set Ref CUI Graphic (e.g. CUIImage) first.", MessageType.Info);
|
||||
EditorGUILayout.HelpBox("Auto set the curves' control points by referencing another CUI. You need to set Ref CUI Graphic (e.g. CUIImage) first.", MessageType.Info);
|
||||
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/// Credit dakka
|
||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/#post-1752415
|
||||
/// Notes - Mod from Yilmaz Kiymaz's editor scripts presentation at Unite 2013
|
||||
/// Updated ddreaper - removed Linq use, not required.
|
||||
/// Updated simonDarksideJ - removed Linq use, not required.
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace UnityEngine.UI.Extensions
|
|||
canvasGroups[i].interactable = false;
|
||||
canvasGroups[i].blocksRaycasts = false;
|
||||
}
|
||||
//If activated and initially deactive
|
||||
//If activated and initially deactivate
|
||||
else if (active && !initialActive)
|
||||
{
|
||||
//Deactivate all others and activate this
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
using UnityEditor;
|
||||
using UnityEditor.AnimatedValues;
|
||||
|
||||
// For manteinance, every new [SerializeField] variable in Scroller must be declared here
|
||||
// For maintenance, every new [SerializeField] variable in Scroller must be declared here
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/// Credit setchi (https://github.com/setchi)
|
||||
/// Sourced from - https://github.com/setchi/FancyScrollView
|
||||
|
||||
// For manteinance, every new [SerializeField] variable in ScrollPositionController must be declared here
|
||||
// For maintenance, every new [SerializeField] variable in ScrollPositionController must be declared here
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
|
|
|
@ -710,7 +710,7 @@ namespace UnityEditor.UI
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Accordian
|
||||
#region Accordion
|
||||
[MenuItem("GameObject/UI/Extensions/Accordion/Accordion Group", false)]
|
||||
static public void AddAccordionGroup(MenuCommand menuCommand)
|
||||
{
|
||||
|
|
118
README.md
118
README.md
|
@ -23,17 +23,17 @@ 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](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads) - 2019.1 (aka 2.1)
|
||||
# [Download - 2019.4 (aka 2.2)](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads)
|
||||
|
||||
We have expanded where you can download the UnityPackage asset and widened the options to contribute to the project.
|
||||
|
||||
> I will still stress however, ***contribution is optional***. **The asset / code will always remain FREE**
|
||||
> I will still stress however, ***contribution is optional***. **The assets / code will always remain FREE**
|
||||
|
||||
| [![Download from Itch.IO](https://bytebucket.org/UnityUIExtensions/unity-ui-extensions/wiki/SiteImages/itchio.png)](https://unityuiextensions.itch.io/uiextensions2-0 "Download from Itch.IO") | [![Download from Itch.IO](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/SiteImages/unionassets.png)](https://unionassets.com/unity-ui-extensions "Download from Union Assets") | [![Download from Itch.IO](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/SiteImages/patreon.jpg)](https://www.patreon.com/UnityUIExtensions "Support Unity UI Extensions on Patreon & download")|
|
||||
| :--- | :--- | :--- |
|
||||
| [Grab from Itchio](https://unityuiextensions.itch.io/uiextensions2-0) | [Obtain via Union Assets](https://unionassets.com/unity-ui-extensions) |[Support through Patreon](https://www.patreon.com/UnityUIExtensions) |
|
||||
|
||||
> Still available on the [BitBucket site](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-2019-1.unitypackage) if you prefer
|
||||
> Still available to download on the [BitBucket site](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads) if you prefer
|
||||
|
||||
To view previous releases, visit the [release archive](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads)
|
||||
|
||||
|
@ -43,7 +43,7 @@ To view previous releases, visit the [release archive](https://bitbucket.org/Uni
|
|||
|
||||
If you wish to further support the Unity UI Extensions project itself, then you can either subsidise your downloads above, or using the links below.
|
||||
|
||||
All funds go to support the project, no matter the amount. Donations in code are also extremely welcome.
|
||||
All funds go to support the project, no matter the amount. **Donations in code are also extremely welcome**
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|
@ -62,12 +62,11 @@ To get started with the project, here's a little guide:
|
|||
|
||||
# [Updates:](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/ReleaseNotes/RELEASENOTES)
|
||||
|
||||
## Update 2019.1 - formally 2.1 - Going with the times
|
||||
## Release 2019.4 - (v2.2) - Back from the future
|
||||
|
||||
Given that it's been a while since the last release and a fair few number of fixes have been introduced since the last update, it's only fair I get this point release out for the masses.
|
||||
This is only a point release and we are still working hard on the next full update
|
||||
It's been a long year since the last official release of the Unity UI Extensions project and WOW, have there been a lot of ups and downs. Big thanks to the community for their support of the project whether that was funds, code or even just testing and helping to iron out some pesky bugs.
|
||||
|
||||
> Be sure to logon to the new Gitter Chat site for the UI Extensions project, if you have any questions, queries or suggestions
|
||||
> Be sure to logon to the new [Gitter Chat](https://gitter.im/Unity-UI-Extensions/Lobby) site for the UI Extensions project, if you have any questions, queries or suggestions
|
||||
>
|
||||
> Much easier that posting a question / issue on YouTube, Twitter or Facebook :D
|
||||
>
|
||||
|
@ -75,35 +74,42 @@ This is only a point release and we are still working hard on the next full upda
|
|||
|
||||
### New / updated features
|
||||
|
||||
* Updated and tested with Unity 2018 / 2019
|
||||
* FancyScrollView updated with newer version (note breaking change)
|
||||
* Added test version of a LineRender control using a List instead of an array
|
||||
* New CardUI layout control, for a snazzy flip card system
|
||||
* New UI Circle Progress indicator control
|
||||
* New UPM deployment for Unity 2019, 2018 will still need to use the asset packages due to Unity compatibility issues.
|
||||
* Updated the project to the new Unity packaging guidelines, including separating out the examples to a separate package.
|
||||
* Many line drawing updates, including the ability to draw using a mouse (check the examples)
|
||||
* Scroll Snaps (HSS/VSS) now have a "Hard Swipe" feature to restrict movement to a single page for each swipe
|
||||
* Scroll Snaps have also been udpated to work better with the UIInfiniteScroll control
|
||||
* New Uniy Card UI controls thanks to @RyanslikeSoCool
|
||||
* Update to the Fancy Scoll controls with even more added fanciness
|
||||
* Several updates to adopt newer Unity standards in the controls to ensure full forwards and backwards compatibility
|
||||
|
||||
### Examples / Examples / Examples
|
||||
(All examples can be deleted without affecting the extensions)
|
||||
Examples now have their own package, this simplifies their use and deployment. Especially in 2019 with the UPM deployment.
|
||||
|
||||
* Added example for CardUI
|
||||
* Added example for the LineRendererList experiment
|
||||
* FancyScrollView examples updated to the new version
|
||||
* Example for new UICircle progress control
|
||||
* Refreshed all examples for Unity 2019
|
||||
* New Card UI Examples to supplement the new controls
|
||||
* New Infinite Scroll Snap example
|
||||
* Fancy Scroll view updated with 2 new examples
|
||||
* New particle system example, demonstrating programmatic control of the particle system
|
||||
|
||||
### Fixes
|
||||
|
||||
* General clean up of build warnings
|
||||
* Refactored primitive controls to be cleaner
|
||||
* Various HSS / VSS updates, mostly from the community
|
||||
* ScrollConflictManager updated to work better with nested HSS/VSS
|
||||
* UI Knob resolved to with screen space camera
|
||||
* Fix for the menu system, which was disabling prefabs instead of the scene instance
|
||||
* Fixed shader in UIParticle System
|
||||
* TextPic updated to support culling properly
|
||||
* Reorderable List updated with additional options
|
||||
* Screenspace overlay support added to the Tooltip control
|
||||
* UIParticle system now supports 3D rotation
|
||||
* UIVerticalScroller updated
|
||||
* Radial slider updated with
|
||||
* Mouse position use updated in
|
||||
- RadialSlider
|
||||
- ColorSampler
|
||||
- TiltWindow
|
||||
* Check compiler warnings (#197)
|
||||
* Line Renderer click to add lines (#183)
|
||||
* ScrollSnap Swiping options - hard fast swipe (#176)
|
||||
* Shader Loading issue / UIParticleSystem (#229)
|
||||
* Issue where Menu Prefabs would be disabled instead of their Clones (#210)
|
||||
* Check ScrollSnapBase update (#265)
|
||||
* UIInfiniteScroller support for VSS updated and fixes
|
||||
* Fix to allow radial slider to start from positions other than left
|
||||
* Fix UI Particles: Texture sheet animation + Random row(#256)
|
||||
* Fix for wandering ScrollSnap controls due to Local Positioning drift
|
||||
* Divide By Zero fix for Gradient (#58)
|
||||
|
||||
|
||||
### Known issues
|
||||
No new issues in this release, but check the issues list for things we are currently working on:
|
||||
|
@ -111,7 +117,9 @@ No new issues in this release, but check the issues list for things we are curre
|
|||
* [UI Extensions Issue log](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues?status=new&status=open)
|
||||
|
||||
## Upgrade Notes
|
||||
No significant concerns, should be able to update over the 2.1 package. If upgrading prior to 2.1, we still recommend removing the UnityUIExtensions folder and then re-importing
|
||||
Due to the restructure of the package to meet Unity's new package guidelines, we recomment **Deleting the current Unity UI Extensions** folder prior to importing the new package
|
||||
|
||||
For Unity 2019 users using the new UPM deployment, be sure to delete the existing folder in your assets folder before adding the new package to avoid conflict
|
||||
|
||||
----------------
|
||||
## Release History
|
||||
|
@ -134,10 +142,10 @@ There are almost 70+ extension controls / effect and other utilities in the proj
|
|||
|
||||
[Controls](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-controls)|||||
|
||||
------|------|------|------|
|
||||
Accordion|ColorPicker|SelectionBox|UIFlippable|ComboBox
|
||||
AutoCompleteComboBox|DropDownList|BoundToolTip|UIWindowBase|UI_Knob
|
||||
TextPic|InputFocus|Box Slider|CooldownButton|Segmented Control
|
||||
Stepper|Range Slider|||
|
||||
Accordion|ColorPicker|Selection Box|UI Flippable|ComboBox
|
||||
AutoComplete ComboBox|DropDown List|BoundToolTip|UIWindowBase|UI Knob
|
||||
TextPic|Input Focus|Box Slider|Cooldown Button|Segmented Control
|
||||
Stepper|Range Slider|Radial Slider|MultiTouch Scroll Rect|
|
||||
||||
|
||||
|
||||
[Primitives](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-primitives)|||||
|
||||
|
@ -150,14 +158,14 @@ UIPolygon||||
|
|||
------|------|------|------|
|
||||
Horizontal Scroll Snap|Vertical Scroll Snap|Flow Layout Group|Radial Layout|Tile Size Fitter
|
||||
Scroll Snap (alt implementation)|Reorderable List|UI Vertical Scroller|Curved Layout|Table Layout
|
||||
FancyScrollView||||
|
||||
FancyScrollView|Card UI|Scroll Position Controller||
|
||||
||||
|
||||
|
||||
[Effects](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-effect_components)|||||
|
||||
------|------|------|------|
|
||||
Best Fit Outline|Curved Text|Gradient|Gradient2|Letter Spacing
|
||||
NicerOutline|RaycastMask|UIFlippable|UIImageCrop|SoftAlphaMask
|
||||
CylinderText|UIParticleSystem|CurlyUI||
|
||||
CylinderText|UIParticleSystem|CurlyUI|Shine Effect|Shader Effects
|
||||
||||
|
||||
|
||||
[VR Components](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-vr_components)|||||
|
||||
|
@ -184,21 +192,32 @@ UIHighlightable|Menu Manager|Pagination Manager||
|
|||
---
|
||||
|
||||
|
||||
# [How do I get set up? ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/GettingStarted)
|
||||
# [How do I get set up?](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/GettingStarted)
|
||||
|
||||
As of Unity 2019, there are now two paths for getting access to the Unity UI Extensions project:
|
||||
|
||||
- Unity 2019 or higher
|
||||
The recommended way to add the Unity UI Extensions project to your solution is to use the Unity package Manager. Simply use the [Unity Package Manager](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/UPMInstallation) to reference the project and install it.
|
||||
|
||||
Alternatively, you can also use the pre-compiled Unity packages if you wish, however, UPM offers full versioning support to allow you to switch versions as you wish.
|
||||
|
||||
- Unity 2018 or lower
|
||||
The pre-compiled Unity assets are the only solution for Unity 2018 or earlier due to the changes in the Unity UI framework in Unity made for 2019.
|
||||
Either clone / download this repository to your machine and then copy the scripts in, or use the pre-packaged .UnityPackage for your version of Unity and import it as a custom package in to your project.
|
||||
|
||||
# [Contribution guidelines ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/ContributionGuidelines)
|
||||
|
||||
Got a script you want added? Then just fork the bitbucket repository and submit a PR. All contributions accepted (including fixes)
|
||||
Just ensure
|
||||
* The header of the script matches the standard used in all scripts
|
||||
|
||||
Just ensure:
|
||||
|
||||
* The header of the script should match the standard used in all scripts
|
||||
* The script uses the **Unity.UI.Extensions** namespace so they do not affect any other developments
|
||||
* (optional) Add Component and Editor options where possible (editor options are in the Editor\UIExtensionsMenuOptions.cs file)
|
||||
|
||||
# [License ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/License)
|
||||
|
||||
All scripts conform to the BSD license and are free to use / distribute. See the [LICENSE](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/License) file for more information
|
||||
All scripts conform to the BSD3 license and are free to use / distribute. See the [LICENSE](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/License) file for more information
|
||||
|
||||
# [Like what you see? ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/FurtherInfo)
|
||||
|
||||
|
@ -213,17 +232,4 @@ I will add more sample scenes for the UI examples in this repository and detail
|
|||
|
||||
# [Previous Releases](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads)
|
||||
|
||||
* [Unity UI Extensions Unity 4.x Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-4.x.unitypackage)
|
||||
|
||||
* [Unity UI Extensions Unity 5.1 Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-5.1.unitypackage)
|
||||
|
||||
* [Unity UI Extensions Unity 5.2 Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-5.2.unitypackage) <- 5.2.0 - 5.2.1 base releases ONLY
|
||||
|
||||
* [Unity UI Extensions Unity 5.3 (5.2.1P+) Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-5.3.unitypackage) <- use this for 5.2.1P+ releases
|
||||
|
||||
> **Note** To retain 5.2 compatibility in the 5.3 package, you will see two warnings related to:
|
||||
> ```
|
||||
> `UnityEngine.UI.InputField.onValueChange' is obsolete.
|
||||
> ```
|
||||
> This has no effect on the package working in 5.4 plus and is only there to maintain backwards compatibility. We will look to update/remove this in a future release, likely after 5.4.
|
||||
If you have any concerns, feel free to update your code in your project to add the missing "d". Unity have ensured it still works as they have mapped the API change for now.
|
||||
Please see the [full downloads list](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads) for all previous releases and their corresponding download links.
|
|
@ -2,6 +2,80 @@
|
|||
This file contains the up to date release notes for each release of the UI Extensions project including release videos where required.
|
||||
|
||||
----------------
|
||||
## Update 2019.4 - 2.2 - Back from the future
|
||||
|
||||
It's been a long year since the last official release of the Unity UI Extensions project and WOW, have there been a lot of ups and downs. Big thanks to the community for their support of the project whether that was funds, code or even just testing and helping to iron out some pesky bugs.
|
||||
|
||||
> Be sure to logon to the new [Gitter Chat](https://gitter.im/Unity-UI-Extensions/Lobby) site for the UI Extensions project, if you have any questions, queries or suggestions
|
||||
>
|
||||
> Much easier that posting a question / issue on YouTube, Twitter or Facebook :D
|
||||
>
|
||||
> ## [UIExtensions Gitter Chanel](https://gitter.im/Unity-UI-Extensions/Lobby)
|
||||
|
||||
### New / updated features
|
||||
|
||||
* New UPM deployment for Unity 2019, 2018 will still need to use the asset packages due to Unity compatibility issues.
|
||||
* Updated the project to the new Unity packaging guidelines, including separating out the examples to a separate package.
|
||||
* Many line drawing updates, including the ability to draw using a mouse (check the examples)
|
||||
* Scroll Snaps (HSS/VSS) now have a "Hard Swipe" feature to restrict movement to a single page for each swipe
|
||||
* Scroll Snaps have also been udpated to work better with the UIInfiniteScroll control
|
||||
* New Uniy Card UI controls thanks to @RyanslikeSoCool
|
||||
* Update to the Fancy Scoll controls with even more added fanciness
|
||||
* Several updates to adopt newer Unity standards in the controls to ensure full forwards and backwards compatibility
|
||||
|
||||
### Examples / Examples / Examples
|
||||
Examples now have their own package, this simplifies their use and deployment. Especially in 2019 with the UPM deployment.
|
||||
|
||||
* Refreshed all examples for Unity 2019
|
||||
* New Card UI Examples to supplement the new controls
|
||||
* New Infinite Scroll Snap example
|
||||
* Fancy Scroll view updated with 2 new examples
|
||||
* New particle system example, demonstrating programmatic control of the particle system
|
||||
|
||||
### Fixes
|
||||
|
||||
* Mouse position use updated in
|
||||
- RadialSlider
|
||||
- ColorSampler
|
||||
- TiltWindow
|
||||
* Check compiler warnings (#197)
|
||||
* Line Renderer click to add lines (#183)
|
||||
* ScrollSnap Swiping options - hard fast swipe (#176)
|
||||
* Shader Loading issue / UIParticleSystem (#229)
|
||||
* Issue where Menu Prefabs would be disabled instead of their Clones (#210)
|
||||
* Check ScrollSnapBase update (#265)
|
||||
* UIInfiniteScroller support for VSS updated and fixes
|
||||
* Fix to allow radial slider to start from positions other than left
|
||||
* Fix UI Particles: Texture sheet animation + Random row(#256)
|
||||
* Fix for wandering ScrollSnap controls due to Local Positioning drift
|
||||
* Divide By Zero fix for Gradient (#58)
|
||||
|
||||
|
||||
### Known issues
|
||||
No new issues in this release, but check the issues list for things we are currently working on:
|
||||
|
||||
* [UI Extensions Issue log](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues?status=new&status=open)
|
||||
|
||||
# [Installation Instructions](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/GettingStarted)
|
||||
|
||||
As of Unity 2019, there are now two paths for getting access to the Unity UI Extensions project:
|
||||
|
||||
- Unity 2019 or higher
|
||||
The recommended way to add the Unity UI Extensions project to your solution is to use the Unity package Manager. Simply use the Unity Package Manager to reference the project to install it
|
||||
|
||||
Alternatively, you can also use the pre-compiled Unity packages if you wish, however, UPM offers full versioning support to allow you to switch versions as you wish.
|
||||
|
||||
- Unity 2018 or lower
|
||||
The pre-compiled Unity assets are the only solution for Unity 2018 or earlier due to the changes in the Unity UI framework in Unity made for 2019.
|
||||
Either clone / download this repository to your machine and then copy the scripts in, or use the pre-packaged .UnityPackage for your version of Unity and import it as a custom package in to your project.
|
||||
|
||||
## Upgrade Notes
|
||||
Due to the restructure of the package to meet Unity's new package guidelines, we recommend **Deleting the current Unity UI Extensions** folder prior to importing the new package.
|
||||
|
||||
For Unity 2019 users using the new UPM deployment, be sure to delete the existing folder in your assets folder before adding the new package to avoid conflict.
|
||||
|
||||
---
|
||||
|
||||
## Update 2019.1 - formally 2.1 - Going with the times
|
||||
|
||||
Given that it's been a while since the last release and a fair few number of fixes have been introduced since the last update, it's only fair I get this point release out for the masses.
|
||||
|
|
|
@ -43,8 +43,8 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
private ScrollRect _scrollRect;
|
||||
|
||||
private List<string> _panelItems; //items that will get shown in the dropdown
|
||||
private List<string> _prunedPanelItems; //items that used to show in the dropdown
|
||||
private List<string> _panelItems; //items that will get shown in the drop-down
|
||||
private List<string> _prunedPanelItems; //items that used to show in the drop-down
|
||||
|
||||
private Dictionary<string, GameObject> panelObjects;
|
||||
|
||||
|
@ -118,7 +118,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
// fires when input text is changed;
|
||||
public SelectionTextChangedEvent OnSelectionTextChanged;
|
||||
// fires when when an Item gets selected / deselected (including when items are added/removed once this is possible)
|
||||
// fires when an Item gets selected / deselected (including when items are added/removed once this is possible)
|
||||
public SelectionValidityChangedEvent OnSelectionValidityChanged;
|
||||
// fires in both cases
|
||||
public SelectionChangedEvent OnSelectionChanged;
|
||||
|
@ -171,7 +171,7 @@ namespace UnityEngine.UI.Extensions
|
|||
catch (System.NullReferenceException ex)
|
||||
{
|
||||
Debug.LogException(ex);
|
||||
Debug.LogError("Something is setup incorrectly with the dropdownlist component causing a Null Refernece Exception");
|
||||
Debug.LogError("Something is setup incorrectly with the dropdownlist component causing a Null Reference Exception");
|
||||
success = false;
|
||||
}
|
||||
panelObjects = new Dictionary<string, GameObject>();
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
private ScrollRect _scrollRect;
|
||||
|
||||
private List<string> _panelItems; //items that will get shown in the dropdown
|
||||
private List<string> _panelItems; //items that will get shown in the drop-down
|
||||
|
||||
private Dictionary<string, GameObject> panelObjects;
|
||||
|
||||
|
@ -119,7 +119,7 @@ namespace UnityEngine.UI.Extensions
|
|||
catch (System.NullReferenceException ex)
|
||||
{
|
||||
Debug.LogException(ex);
|
||||
Debug.LogError("Something is setup incorrectly with the dropdownlist component causing a Null Refernece Exception");
|
||||
Debug.LogError("Something is setup incorrectly with the dropdownlist component causing a Null Reference Exception");
|
||||
success = false;
|
||||
}
|
||||
panelObjects = new Dictionary<string, GameObject>();
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace UnityEngine.UI.Extensions
|
|||
[SerializeField]
|
||||
private string _id;
|
||||
///<summary>
|
||||
///ID exists so that an item can have a caption and a value like in traditional windows forms. Ie. an item may be a student's name, and the ID can be the student's ID number
|
||||
///ID exists so that an item can have a caption and a value like in traditional windows forms. IE. an item may be a student's name, and the ID can be the student's ID number
|
||||
///</summary>
|
||||
public string ID
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit mgear, SimonDarksideJ
|
||||
/// Sourced from - https://forum.unity3d.com/threads/radial-slider-circle-slider.326392/#post-3143582
|
||||
/// Updated to include lerping features and programatic access to angle/value
|
||||
/// Updated to include lerping features and programmatic access to angle/value
|
||||
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
|
|
|
@ -439,7 +439,7 @@ namespace UnityEngine.UI.Extensions
|
|||
void UpdateDrag(PointerEventData eventData, Camera cam)
|
||||
{
|
||||
//this needs to differ from slider in that we have two handles, and need to move the right one.
|
||||
//and if it was neither handle, we will have a seperate case where both handles move uniformly
|
||||
//and if it was neither handle, we will have a separate case where both handles move uniformly
|
||||
//moving the entire range
|
||||
|
||||
//this is where we use our interationState
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
private IEnumerator RefreshChildren()
|
||||
{
|
||||
//Handle new chilren
|
||||
//Handle new children
|
||||
for (int i = 0; i < _rect.childCount; i++)
|
||||
{
|
||||
if (_cachedChildren.Contains(_rect.GetChild(i)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit Ziboo, Andrew Quesenberry
|
||||
/// Sourced from - http://forum.unity3d.com/threads/free-reorderable-list.364600/
|
||||
/// Last Child Fix - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/70/all-re-orderable-lists-cause-a-transform
|
||||
/// Last Child Fix - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/70/all-re-orderable-lists-cause-a-transform
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -160,7 +160,7 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
}
|
||||
|
||||
//If nothing found or the list is not dropable, put the fake element outsite
|
||||
//If nothing found or the list is not dropable, put the fake element outside
|
||||
if (_currentReorderableListRaycasted == null || _currentReorderableListRaycasted.IsDropable == false
|
||||
|| (_oldReorderableListRaycasted != _reorderableList && !IsTransferable)
|
||||
|| ((_fakeElement.parent == _currentReorderableListRaycasted.Content
|
||||
|
@ -484,7 +484,7 @@ namespace UnityEngine.UI.Extensions
|
|||
_reorderableList.OnElementAdded.Invoke(args);
|
||||
|
||||
if (!isValid)
|
||||
throw new Exception("Transfer is already Cancelled.");
|
||||
throw new Exception("Transfer is already Canceled.");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -41,13 +41,13 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
// An optional parameter, but you can add a sprite to the selection box to give it a border or a stylized look.
|
||||
// It's suggested you use a monochrome sprite so that the selection
|
||||
// Box color is still relevent.
|
||||
// Box color is still relevant.
|
||||
public Sprite art;
|
||||
|
||||
// Will store the location of wherever we first click before dragging.
|
||||
private Vector2 origin;
|
||||
|
||||
// A rectTransform set by the User that can limit which part of the screen is eligable for drag selection
|
||||
// A rectTransform set by the User that can limit which part of the screen is eligible for drag selection
|
||||
public RectTransform selectionMask;
|
||||
|
||||
//Stores the rectTransform connected to the generated gameObject being used for the selection box visuals
|
||||
|
@ -199,7 +199,7 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
|
||||
bool PointIsValidAgainstSelectionMask(Vector2 screenPoint){
|
||||
//If there is no seleciton mask, any point is valid
|
||||
//If there is no selection mask, any point is valid
|
||||
if (!selectionMask) {
|
||||
return true;
|
||||
}
|
||||
|
@ -215,14 +215,14 @@ namespace UnityEngine.UI.Extensions
|
|||
return null;
|
||||
}
|
||||
|
||||
//This gets a bit tricky, because we have to make considerations depending on the heirarchy of the selectable's gameObject
|
||||
//This gets a bit tricky, because we have to make considerations depending on the hierarchy of the selectable's gameObject
|
||||
foreach (var selectable in selectables) {
|
||||
|
||||
//First we check to see if the selectable has a rectTransform
|
||||
var rectTransform = (selectable.transform as RectTransform);
|
||||
|
||||
if (rectTransform) {
|
||||
//Because if it does, the camera we use to calulate it's screen point will vary
|
||||
//Because if it does, the camera we use to calculate it's screen point will vary
|
||||
var screenCamera = GetScreenPointCamera(rectTransform);
|
||||
|
||||
//Once we've found the rendering camera, we check if the selectables rectTransform contains the click. That way we
|
||||
|
@ -290,7 +290,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
Vector3 screenPoint = GetScreenPointOfSelectable(selectable);
|
||||
|
||||
//If the box Rect contains the selectabels screen point and that point is inside a valid selection mask, it's being preselected, otherwise it is not.
|
||||
//If the box Rect contains the selectables screen point and that point is inside a valid selection mask, it's being preselected, otherwise it is not.
|
||||
selectable.preSelected = RectTransformUtility.RectangleContainsScreenPoint(boxRect, screenPoint, null) && PointIsValidAgainstSelectionMask(screenPoint);
|
||||
|
||||
}
|
||||
|
@ -331,12 +331,12 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
|
||||
Vector2 GetScreenPointOfSelectable(IBoxSelectable selectable) {
|
||||
//Getting the screen point requires it's own function, because we have to take into consideration the selectables heirarchy.
|
||||
//Getting the screen point requires it's own function, because we have to take into consideration the selectables hierarchy.
|
||||
|
||||
//Cast the transform as a rectTransform
|
||||
var rectTransform = selectable.transform as RectTransform;
|
||||
|
||||
//If it has a rectTransform component, it must be in the heirarchy of a canvas, somewhere.
|
||||
//If it has a rectTransform component, it must be in the hierarchy of a canvas, somewhere.
|
||||
if (rectTransform) {
|
||||
|
||||
//And the camera used to calculate it's screen point will vary.
|
||||
|
@ -345,7 +345,7 @@ namespace UnityEngine.UI.Extensions
|
|||
return RectTransformUtility.WorldToScreenPoint(renderingCamera, selectable.transform.position);
|
||||
}
|
||||
|
||||
//If it's no in the heirarchy of a canvas, the regular Camera.main.WorldToScreenPoint will do.
|
||||
//If it's no in the hierarchy of a canvas, the regular Camera.main.WorldToScreenPoint will do.
|
||||
return Camera.main.WorldToScreenPoint(selectable.transform.position);
|
||||
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ namespace UnityEngine.UI.Extensions
|
|||
Canvas rootCanvas = null;
|
||||
RectTransform rectCheck = rectTransform;
|
||||
|
||||
//We're going to check all the canvases in the heirarchy of this rectTransform until we find the root.
|
||||
//We're going to check all the canvases in the hierarchy of this rectTransform until we find the root.
|
||||
do {
|
||||
rootCanvas = rectCheck.GetComponent<Canvas>();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// Credit Tomasz Schelenz
|
||||
/// Sourced from - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/46/feature-uiknob#comment-29243988
|
||||
/// Sourced from - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/46/feature-uiknob#comment-29243988
|
||||
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace UnityEngine.UI.Extensions
|
|||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Refernce to other objects that are needed by this object.
|
||||
/// Reference to other objects that are needed by this object.
|
||||
/// </summary>
|
||||
#region Links
|
||||
|
||||
|
@ -273,7 +273,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
#endregion
|
||||
|
||||
// Events are for handling reoccuring function calls that react to the changes of the environment.
|
||||
// Events are for handling reoccurring function calls that react to the changes of the environment.
|
||||
#region Events
|
||||
|
||||
protected override void OnRectTransformDimensionsChange()
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
}
|
||||
|
||||
// constraing the corner ratio
|
||||
// constraining the corner ratio
|
||||
if (cornerPosRatio.x < 0)
|
||||
{
|
||||
cornerPosRatio.x = 0;
|
||||
|
|
|
@ -15,7 +15,7 @@ rather primitive, but I can't see any better way at the moment. It means that
|
|||
all sorts of things can break the effect...
|
||||
|
||||
This component should be placed higher in component list than any other vertex
|
||||
modifiers that alter the total number of vertices. Eg, place this above Shadow
|
||||
modifiers that alter the total number of vertices. EG, place this above Shadow
|
||||
or Outline effects. If you don't, the outline/shadow won't match the position
|
||||
of the letters properly. If you place the outline/shadow effect second however,
|
||||
it will just work on the altered vertices from this component, and function
|
||||
|
|
|
@ -15,7 +15,7 @@ rather primitive, but I can't see any better way at the moment. It means that
|
|||
all sorts of things can break the effect...
|
||||
|
||||
This component should be placed higher in component list than any other vertex
|
||||
modifiers that alter the total number of vertices. Eg, place this above Shadow
|
||||
modifiers that alter the total number of vertices. EG, place this above Shadow
|
||||
or Outline effects. If you don't, the outline/shadow won't match the position
|
||||
of the letters properly. If you place the outline/shadow effect second however,
|
||||
it will just work on the altered vertices from this component, and function
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit NemoKrad (aka Charles Humphrey) / valtain
|
||||
/// Sourced from - http://www.randomchaos.co.uk/SoftAlphaUIMask.aspx
|
||||
/// Updated by valtain - https://bitbucket.org/ddreaper/unity-ui-extensions/pull-requests/33
|
||||
/// Updated by valtain - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/pull-requests/33
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit glennpow, Zarlang
|
||||
/// Sourced from - http://forum.unity3d.com/threads/free-script-particle-systems-in-ui-screen-space-overlay.406862/
|
||||
/// Updated by Zarlang with a more robust implementation, including TextureSheet annimation support
|
||||
/// Updated by Zarlang with a more robust implementation, including TextureSheet animation support
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace UnityEngine.EventSystems.Extensions
|
|||
PointerEventData pointerData;
|
||||
|
||||
//Not certain on the use of this.
|
||||
//I know that -1 is the mouse and anything positive would be a finger/touch, 0 being the first finger, 1 beign the second and so one till the system limit is reached.
|
||||
//I know that -1 is the mouse and anything positive would be a finger/touch, 0 being the first finger, 1 being the second and so one till the system limit is reached.
|
||||
//So that is the reason I choose -2.
|
||||
GetPointerData(-2, out pointerData, true);
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace UnityEngine.EventSystems.Extensions
|
|||
// handler to be what would receive a click.
|
||||
var newPressed = ExecuteEvents.ExecuteHierarchy(currentOverGo, pointer, ExecuteEvents.submitHandler);
|
||||
|
||||
// didnt find a press handler... search for a click handler
|
||||
// didn't find a press handler... search for a click handler
|
||||
if (newPressed == null)
|
||||
{
|
||||
newPressed = ExecuteEvents.ExecuteHierarchy(currentOverGo, pointer, ExecuteEvents.pointerDownHandler);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/// Credit Simon (darkside) Jackson
|
||||
/// Credit Simon (simonDarksideJ) Jackson
|
||||
/// Sourced from - UI SIM source and My Brain
|
||||
|
||||
namespace UnityEngine.EventSystems
|
||||
|
@ -193,7 +193,7 @@ namespace UnityEngine.EventSystems
|
|||
if (!allow)
|
||||
{
|
||||
// Otherwise, user held down key or axis.
|
||||
// If direction didn't change at least 90 degrees, wait for delay before allowing consequtive event.
|
||||
// If direction didn't change at least 90 degrees, wait for delay before allowing consecutive event.
|
||||
if (similarDir && m_ConsecutiveMoveCount == 1)
|
||||
allow = (time > m_PrevActionTime + m_RepeatDelay);
|
||||
// If direction changed at least 90 degree, or we already had the delay, repeat at repeat rate.
|
||||
|
|
|
@ -41,7 +41,7 @@ public class CardStack2D : MonoBehaviour
|
|||
///I wouldn't really recommend changing it, but go ahead if you want to.
|
||||
xPowerDifference = 9 - cards.Length;
|
||||
|
||||
///This is optional, but makes it super easy to figure out the offscreen position for cards.
|
||||
///This is optional, but makes it super easy to figure out the off screen position for cards.
|
||||
///Unfortunately, it's only really useful if the cards are the same width.
|
||||
if (useDefaultUsedXPos)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
[Header("Events")]
|
||||
[SerializeField]
|
||||
[Tooltip("Event is triggered whenever the scroll rect starts to move, even when triggered programatically")]
|
||||
[Tooltip("Event is triggered whenever the scroll rect starts to move, even when triggered programmatically")]
|
||||
private StartMovementEvent m_StartMovementEvent = new StartMovementEvent();
|
||||
public StartMovementEvent MovementStarted
|
||||
{
|
||||
|
@ -564,9 +564,9 @@ namespace UnityEngine.UI.Extensions
|
|||
public struct MoveInfo
|
||||
{
|
||||
public enum IndexType { childIndex, positionIndex }
|
||||
[Tooltip("Child Index means the Index coresponds to the content item at that index in the hierarchy.\n" +
|
||||
[Tooltip("Child Index means the Index corresponds to the content item at that index in the hierarchy.\n" +
|
||||
"Position Index means the Index corresponds to the content item in that snap position.\n" +
|
||||
"A higher Position Index in a Horizonal Scroll Snap means it would be further to the right.")]
|
||||
"A higher Position Index in a Horizontal Scroll Snap means it would be further to the right.")]
|
||||
public IndexType indexType;
|
||||
[Tooltip("Zero based")]
|
||||
public int index;
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace UnityEngine.UI.Extensions
|
|||
[Tooltip("size of each item along the Normalized axis")]
|
||||
public float itemSize;
|
||||
|
||||
// the slope can be moved by altering this setting, it could be constrained to the 0-1 range, but other values are usefull for animations
|
||||
// the slope can be moved by altering this setting, it could be constrained to the 0-1 range, but other values are useful for animations
|
||||
public float centerpoint = 0.5f;
|
||||
|
||||
protected override void OnEnable() { base.OnEnable(); CalculateRadial(); }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/// Sourced from - http://forum.unity3d.com/threads/flowlayoutgroup.296709/
|
||||
/// Example http://forum.unity3d.com/threads/flowlayoutgroup.296709/
|
||||
/// Update by Martin Sharkbomb - http://forum.unity3d.com/threads/flowlayoutgroup.296709/#post-1977028
|
||||
/// Last item alignment fix by Vicente Russo - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/22/flow-layout-group-align
|
||||
/// Last item alignment fix by Vicente Russo - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/22/flow-layout-group-align
|
||||
/// Vertical Flow by Ramon Molossi
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit BinaryX
|
||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1945602
|
||||
/// Updated by ddreaper - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
/// Updated by SimonDarksideJ - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
|
||||
using System;
|
||||
using UnityEngine.EventSystems;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
/// Credit Danny Goodayle
|
||||
/// Sourced from - http://www.justapixel.co.uk/radial-layouts-nice-and-simple-in-unity3ds-ui-system/
|
||||
/// Updated by ddreaper - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
/// Chid Layout fix by John Hattan - enables an options
|
||||
/// Updated by SimonDarksideJ - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
/// Child Layout fix by John Hattan - enables an options
|
||||
|
||||
/*
|
||||
Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit BinaryX
|
||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1945602
|
||||
/// Updated by ddreaper - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
/// Updated by simonDarksideJ - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
/// Update by xesenix - rewrote almost the entire code
|
||||
/// - configuration for direction move instead of 2 concurrent class (easier to change direction in editor)
|
||||
/// - supports list layout with horizontal or vertical layout need to match direction with type of layout used
|
||||
|
@ -39,7 +39,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
private int _startingPage = 0;
|
||||
|
||||
// anchor points to lerp to to see child on certain indexes
|
||||
// anchor points to lerp to see child on certain indexes
|
||||
private Vector3[] _pageAnchorPositions;
|
||||
|
||||
private Vector3 _lerpTarget;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit BinaryX
|
||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1945602
|
||||
/// Updated by ddreaper - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
/// Updated by simonDarksideJ - removed dependency on a custom ScrollRect script. Now implements drag interfaces and standard Scroll Rect.
|
||||
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit Anonymous donation
|
||||
/// Sourced from - https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues/120/horizontal-scroll-snap-scroll-bar-fix
|
||||
/// Updated by ddreaper - Made extension support all types of scroll snap
|
||||
/// Updated by simonDarksideJ - Made extension support all types of scroll snap
|
||||
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace UnityEngine.UI.Extensions
|
|||
public RectTransform center;
|
||||
[Tooltip("Size / spacing of elements")]
|
||||
public RectTransform elementSize;
|
||||
[Tooltip("Scale = 1/ (1+distance fom center * shrinkage)")]
|
||||
[Tooltip("Scale = 1/ (1+distance from center * shrinkage)")]
|
||||
public Vector2 elementShrinkage = new Vector2(1f / 200, 1f / 200);
|
||||
[Tooltip("Minimum element scale (furthest from center)")]
|
||||
public Vector2 minScale = new Vector2(0.7f, 0.7f);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit zge, jeremie sellam
|
||||
/// Sourced from - http://forum.unity3d.com/threads/draw-circles-or-primitives-on-the-new-ui-canvas.272488/#post-2293224
|
||||
/// Updated from - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/65/a-better-uicircle
|
||||
/// Updated from - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/65/a-better-uicircle
|
||||
|
||||
/// Update 10.9.2017 (tswalker, https://bitbucket.org/tswalker/)
|
||||
///
|
||||
|
|
|
@ -160,7 +160,7 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
if (BezierMode == BezierType.Catenary && pointsToDraw.Length == 2) {
|
||||
CableCurve cable = new CableCurve (pointsToDraw);
|
||||
cable.slack = Resoloution;
|
||||
cable.slack = Resolution;
|
||||
cable.steps = BezierSegmentsPerCurve;
|
||||
pointsToDraw = cable.Points ();
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ namespace UnityEngine.UI.Extensions
|
|||
vh.AddUIVertexQuad (segments [i]);
|
||||
}
|
||||
if (vh.currentVertCount > 64000) {
|
||||
Debug.LogError ("Max Verticies size is 64000, current mesh vertcies count is [" + vh.currentVertCount + "] - Cannot Draw");
|
||||
Debug.LogError ("Max Verticies size is 64000, current mesh verticies count is [" + vh.currentVertCount + "] - Cannot Draw");
|
||||
vh.Clear ();
|
||||
return;
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ namespace UnityEngine.UI.Extensions
|
|||
/// <remarks>
|
||||
/// Positive numbers should be used to specify Index and Segment
|
||||
/// </remarks>
|
||||
/// <param name="index">Requied Index of the point, starting from point 1</param>
|
||||
/// <param name="index">Required Index of the point, starting from point 1</param>
|
||||
/// <param name="segmentIndex">(optional) Required Segment the point is held in, Starting from Segment 1</param>
|
||||
/// <returns>Vector2 position of the point within UI Space</returns>
|
||||
public Vector2 GetPosition(int index, int segmentIndex = 0)
|
||||
|
@ -435,7 +435,7 @@ namespace UnityEngine.UI.Extensions
|
|||
/// <summary>
|
||||
/// Get the Vector2 position of a line within a specific segment
|
||||
/// </summary>
|
||||
/// <param name="index">Requied Index of the point, starting from point 1</param>
|
||||
/// <param name="index">Required Index of the point, starting from point 1</param>
|
||||
/// <param name="segmentIndex"> Required Segment the point is held in, Starting from Segment 1</param>
|
||||
/// <returns>Vector2 position of the point within UI Space</returns>
|
||||
public Vector2 GetPositionBySegment(int index, int segment)
|
||||
|
@ -446,7 +446,7 @@ namespace UnityEngine.UI.Extensions
|
|||
/// <summary>
|
||||
/// Get the closest point between two given Vector2s from a given Vector2 point
|
||||
/// </summary>
|
||||
/// <param name="p1">Starting postion</param>
|
||||
/// <param name="p1">Starting position</param>
|
||||
/// <param name="p2">End position</param>
|
||||
/// <param name="p3">Desired / Selected point</param>
|
||||
/// <returns>Closest Vector2 position of the target within UI Space</returns>
|
||||
|
|
|
@ -179,7 +179,7 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
if (BezierMode == BezierType.Catenary && pointsToDraw.Count == 2) {
|
||||
CableCurve cable = new CableCurve (pointsToDraw);
|
||||
cable.slack = Resoloution;
|
||||
cable.slack = Resolution;
|
||||
cable.steps = BezierSegmentsPerCurve;
|
||||
pointsToDraw.Clear();
|
||||
pointsToDraw.AddRange(cable.Points());
|
||||
|
@ -282,7 +282,7 @@ namespace UnityEngine.UI.Extensions
|
|||
vh.AddUIVertexQuad (segments [i]);
|
||||
}
|
||||
if (vh.currentVertCount > 64000) {
|
||||
Debug.LogError ("Max Verticies size is 64000, current mesh vertcies count is [" + vh.currentVertCount + "] - Cannot Draw");
|
||||
Debug.LogError ("Max Verticies size is 64000, current mesh verticies count is [" + vh.currentVertCount + "] - Cannot Draw");
|
||||
vh.Clear ();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
[SerializeField]
|
||||
protected float m_Resolution;
|
||||
public float Resoloution { get { return m_Resolution; } set { m_Resolution = value; SetAllDirty(); } }
|
||||
public float Resolution { get { return m_Resolution; } set { m_Resolution = value; SetAllDirty(); } }
|
||||
|
||||
[SerializeField]
|
||||
private bool m_useNativeSize;
|
||||
|
@ -287,7 +287,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
/// <summary>
|
||||
/// Return image adjusted position
|
||||
/// **Copied from Unity's Image component for now and simplified for UI Extensions primatives
|
||||
/// **Copied from Unity's Image component for now and simplified for UI Extensions primitives
|
||||
/// </summary>
|
||||
/// <param name="local"></param>
|
||||
/// <param name="rect"></param>
|
||||
|
@ -335,7 +335,7 @@ namespace UnityEngine.UI.Extensions
|
|||
for (int axis = 0; axis <= 1; axis++)
|
||||
{
|
||||
// If the rect is smaller than the combined borders, then there's not room for the borders at their normal size.
|
||||
// In order to avoid artefacts with overlapping borders, we scale the borders down to fit.
|
||||
// In order to avoid artefact's with overlapping borders, we scale the borders down to fit.
|
||||
float combinedBorders = border[axis] + border[axis + 2];
|
||||
if (rect.size[axis] < combinedBorders && combinedBorders != 0)
|
||||
{
|
||||
|
|
|
@ -118,9 +118,7 @@ namespace UnityEngine.UI.Extensions
|
|||
OnScreenSpaceCamera();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//temporary call to don't fuck up old code, will be removed
|
||||
//temporary call to not mess up old code, will be removed
|
||||
public void SetTooltip(string text, bool test)
|
||||
{
|
||||
NewTooltip();
|
||||
|
@ -136,7 +134,7 @@ namespace UnityEngine.UI.Extensions
|
|||
//position function, currently not working correctly due to the use of pivots and not manual offsets, soon to be fixed
|
||||
public void OnScreenSpaceCamera()
|
||||
{
|
||||
//get the dynamic position of the pous in viewport coordinates
|
||||
//get the dynamic position of the pos in viewport coordinates
|
||||
Vector3 newPos = GUICamera.ScreenToViewportPoint(Input.mousePosition);
|
||||
|
||||
// store in val the updated position (x or y) of the tooltip edge of interest
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit drHogan
|
||||
/// Sourced from - http://forum.unity3d.com/threads/screenspace-camera-tooltip-controller-sweat-and-tears.293991/#post-1938929
|
||||
/// updated ddreaper - refactored code to be more performant.
|
||||
/// updated simonDarksideJ - refactored code to be more performant.
|
||||
/// updated lucasvinbr - mixed with BoundTooltip, should work with Screenspace Camera (non-rotated) and Overlay
|
||||
/// *Note - only works for non-rotated Screenspace Camera and Screenspace Overlay canvases at present, needs updating to include rotated Screenspace Camera and Worldspace!
|
||||
|
||||
|
@ -34,7 +34,7 @@ namespace UnityEngine.UI.Extensions
|
|||
public Canvas canvas;
|
||||
|
||||
[Tooltip("Sets if tooltip triggers will run ForceUpdateCanvases and refresh the tooltip's layout group " +
|
||||
"(if any) when hovered, in order to prevent momentaneous misplacement sometimes caused by ContentSizeFitters")]
|
||||
"(if any) when hovered, in order to prevent momentousness misplacement sometimes caused by ContentSizeFitters")]
|
||||
public bool tooltipTriggersCanForceCanvasUpdate = false;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
}
|
||||
|
||||
//Note, the begin drag and end drag aren't actually needed to control the drag. However, I'd recommend keeping it in case you want to do somethind else when draggging starts and stops
|
||||
//Note, the begin drag and end drag aren't actually needed to control the drag. However, I'd recommend keeping it in case you want to do something else when dragging starts and stops
|
||||
public void OnBeginDrag(PointerEventData eventData)
|
||||
{
|
||||
|
||||
|
|
|
@ -170,12 +170,12 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
|
||||
/**
|
||||
Caluclates a point on the path.
|
||||
Calculates a point on the path.
|
||||
|
||||
@param curveIndex The index of the curve that the point is on. For example,
|
||||
the second curve (index 1) is the curve with controlpoints 3, 4, 5, and 6.
|
||||
the second curve (index 1) is the curve with control points 3, 4, 5, and 6.
|
||||
|
||||
@param t The paramater indicating where on the curve the point is. 0 corresponds
|
||||
@param t The parameter indicating where on the curve the point is. 0 corresponds
|
||||
to the "left" point, 1 corresponds to the "right" end point.
|
||||
*/
|
||||
public Vector2 CalculateBezierPoint(int curveIndex, float t)
|
||||
|
@ -221,7 +221,7 @@ namespace UnityEngine.UI.Extensions
|
|||
Gets the drawing points. This implementation simply calculates a certain number
|
||||
of points per curve.
|
||||
|
||||
This is a lsightly different inplementation from the one above.
|
||||
This is a slightly different implementation from the one above.
|
||||
*/
|
||||
public List<Vector2> GetDrawingPoints1()
|
||||
{
|
||||
|
@ -327,7 +327,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
|
||||
/**
|
||||
Caluclates a point on the Bezier curve represented with the four controlpoints given.
|
||||
Calculates a point on the Bezier curve represented with the four control points given.
|
||||
*/
|
||||
private Vector2 CalculateBezierPoint(float t, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3)
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace UnityEngine.UI.Extensions
|
|||
{
|
||||
/// <summary>
|
||||
/// Improved C# LZF Compressor, a very small data compression library. The compression algorithm is extremely fast.
|
||||
/// Note for strings, ensure you only use Unicode else specaial characters may get corrupted.
|
||||
/// Note for strings, ensure you only use Unicode else special characters may get corrupted.
|
||||
public static class CLZF2
|
||||
{
|
||||
private static readonly uint HLOG = 14;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// Credit Vicente Russo
|
||||
/// Sourced from - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/23/returnkeytriggersbutton
|
||||
/// Sourced from - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/23/returnkeytriggersbutton
|
||||
|
||||
using UnityEngine.Events;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/// sourced from: http://answers.unity3d.com/questions/1149417/ui-button-onclick-sensitivity-for-high-dpi-devices.html#answer-1197307
|
||||
|
||||
/*USAGE:
|
||||
Simply place the script on A Text control in the scene to display the current PPI / DPI of the sceen*/
|
||||
Simply place the script on A Text control in the scene to display the current PPI / DPI of the screen*/
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace UnityEngine.UI.Extensions
|
|||
return;
|
||||
}
|
||||
|
||||
// dont want the scroll snap pagination
|
||||
// do not want the scroll snap pagination
|
||||
if (scrollSnap.Pagination)
|
||||
scrollSnap.Pagination = null;
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// Calling from other scripts if you need to change screens progamatically
|
||||
/// Calling from other scripts if you need to change screens programmatically
|
||||
/// </summary>
|
||||
/// <param name="pageNo"></param>
|
||||
public void GoToScreen(int pageNo)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit Melang
|
||||
/// Sourced from - http://forum.unity3d.com/members/melang.593409/
|
||||
/// Updated ddreaper - reworked to 4.6.1 standards
|
||||
/// Updated SimonDarksideJ - reworked to 4.6.1 standards
|
||||
|
||||
using UnityEngine.EventSystems;
|
||||
namespace UnityEngine.UI
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/// Credit srinivas sunil
|
||||
/// sourced from: https://bitbucket.org/ddreaper/unity-ui-extensions/pull-requests/21/develop_53/diff
|
||||
/// sourced from: https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/pull-requests/21/develop_53/diff
|
||||
/// Updated by Hiep Eldest : https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues/300/scrollconflictmanager-not-working-if
|
||||
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
/// <summary>
|
||||
/// This is the most efficient way to handle scroll conflicts when there are multiple scroll rects, this is useful when there is a vertical scrollrect in/on a horizontal scrollrect or vice versa
|
||||
/// Attach the script to the rect scroll and assign other rectscroll in the inspecter (one is verticle and other is horizontal) gathered and modified from unity answers(delta snipper)
|
||||
/// Attach the script to the rect scroll and assign other rectscroll in the inspector (one is vertical and other is horizontal) gathered and modified from unity answers(delta snipper)
|
||||
/// </summary>
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ namespace UnityEngine.UI.Extensions
|
|||
private IDragHandler[] _dragHandlers;
|
||||
//This tracks if the other one should be scrolling instead of the current one.
|
||||
private bool scrollOther;
|
||||
//This tracks wether the other one should scroll horizontally or vertically.
|
||||
//This tracks whether the other one should scroll horizontally or vertically.
|
||||
private bool scrollOtherHorizontally;
|
||||
|
||||
void Awake()
|
||||
|
@ -41,11 +41,11 @@ namespace UnityEngine.UI.Extensions
|
|||
if (_myScrollRect.horizontal)
|
||||
Debug.LogError("You have added the SecondScrollRect to a scroll view that already has both directions selected");
|
||||
if (!ParentScrollRect.horizontal)
|
||||
Debug.LogError("The other scroll rect doesnt support scrolling horizontally");
|
||||
Debug.LogError("The other scroll rect does not support scrolling horizontally");
|
||||
}
|
||||
else if (!ParentScrollRect.vertical)
|
||||
{
|
||||
Debug.LogError("The other scroll rect doesnt support scrolling vertically");
|
||||
Debug.LogError("The other scroll rect does not support scrolling vertically");
|
||||
}
|
||||
|
||||
if (ParentScrollRect && !ParentScrollSnap)
|
||||
|
@ -73,7 +73,7 @@ namespace UnityEngine.UI.Extensions
|
|||
if (horizontal > vertical)
|
||||
{
|
||||
scrollOther = true;
|
||||
//disable the current scroll rect so it doesnt move.
|
||||
//disable the current scroll rect so it does not move.
|
||||
_myScrollRect.enabled = false;
|
||||
for (int i = 0, length = _beginDragHandlers.Length; i < length; i++)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ namespace UnityEngine.UI.Extensions
|
|||
else if (vertical > horizontal)
|
||||
{
|
||||
scrollOther = true;
|
||||
//disable the current scroll rect so it doesnt move.
|
||||
//disable the current scroll rect so it does not move.
|
||||
_myScrollRect.enabled = false;
|
||||
for (int i = 0, length = _beginDragHandlers.Length; i < length; i++)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/// sourced from: http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-2011648
|
||||
|
||||
/*USAGE:
|
||||
Simply place the script on the ScrollRect that contains the selectable children we'll be scroling to
|
||||
Simply place the script on the ScrollRect that contains the selectable children we'll be scrolling to
|
||||
and drag'n'drop the RectTransform of the options "container" that we'll be scrolling.*/
|
||||
|
||||
using System;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/// Credit Simon (darkside) Jackson
|
||||
/// Credit Simon (simonDarksideJ) Jackson
|
||||
/// Sourced from - My head
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/// sourced from: http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-2011648
|
||||
|
||||
/*USAGE:
|
||||
Simply place the script on the ScrollRect that contains the selectable children we'll be scroling to
|
||||
Simply place the script on the ScrollRect that contains the selectable children we'll be scrolling to
|
||||
and drag'n'drop the RectTransform of the options "container" that we'll be scrolling.*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/// you can restrict movement by locking axis on ScrollRect component
|
||||
|
||||
/*USAGE:
|
||||
Simply place the script on the ScrollRect that contains the selectable children we'll be scroling to
|
||||
Simply place the script on the ScrollRect that contains the selectable children we'll be scrolling to
|
||||
and drag'n'drop the RectTransform of the options "container" that we'll be scrolling.*/
|
||||
|
||||
using UnityEngine.EventSystems;
|
||||
|
@ -48,7 +48,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
private void ScrollRectToLevelSelection()
|
||||
{
|
||||
// FIX: if you dont do that here events can have null value
|
||||
// FIX: if you do not do that here events can have null value
|
||||
var events = EventSystem.current;
|
||||
|
||||
// check main references
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit AriathTheWise, Sfyne
|
||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1796783
|
||||
/// Additional disabled - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/47/uiselectableextension-_pressed-bug
|
||||
/// Additional disabled - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/47/uiselectableextension-_pressed-bug
|
||||
/// Extended to include a HELD state that continually fires while the button is held down.
|
||||
/// Refactored so it can be added to any button and expose the events in the editor.
|
||||
|
||||
|
@ -81,7 +81,7 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test method to verify a controll is pressed
|
||||
/// Test method to verify a control is pressed
|
||||
/// </summary>
|
||||
public void TestPressed()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// Credit Tomasz Schelenz
|
||||
/// Sourced from - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/81/infinite-scrollrect
|
||||
/// Sourced from - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/81/infinite-scrollrect
|
||||
/// Demo - https://www.youtube.com/watch?v=uVTV7Udx78k - configures automatically. - works in both vertical and horizontal (but not both at the same time) - drag and drop - can be initialized by code (in case you populate your scrollview content from code)
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
@ -82,7 +82,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
if (_isHorizontal && _isVertical)
|
||||
{
|
||||
Debug.LogError("UI_InfiniteScroll doesn't support scrolling in both directions, plase choose one direction (horizontal or vertical)");
|
||||
Debug.LogError("UI_InfiniteScroll doesn't support scrolling in both directions, please choose one direction (horizontal or vertical)");
|
||||
}
|
||||
|
||||
_itemCount = _scrollRect.content.childCount;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit Tomasz Schelenz
|
||||
/// Sourced from - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/82/scrollrectocclusion
|
||||
/// Demo - https://youtu.be/uVTV7Udx78k?t=39s ScrollRectOcclusion - disables the objects outside of the scrollrect viewport. Usefull for scrolls with lots of content, reduces geometry and drawcalls (if content is not batched) In some cases it might create a bit of spikes, especially if you have lots of UI.Text objects in the childs. In that case consider to Add CanvasGroup to your childs and instead of calling setActive on game object change CanvasGroup.alpha value. At 0 it is not being rendered hence will also optimize the prformance.
|
||||
/// Sourced from - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/82/scrollrectocclusion
|
||||
/// Demo - https://youtu.be/uVTV7Udx78k?t=39s ScrollRectOcclusion - disables the objects outside of the scrollrect viewport. Useful for scrolls with lots of content, reduces geometry and drawcalls (if content is not batched) In some cases it might create a bit of spikes, especially if you have lots of UI.Text objects in the childs. In that case consider to Add CanvasGroup to your childs and instead of calling setActive on game object change CanvasGroup.alpha value. At 0 it is not being rendered hence will also optimize the performance.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// Credit Tomasz Schelenz
|
||||
/// Sourced from - https://bitbucket.org/ddreaper/unity-ui-extensions/issues/83/ui_tweenscale
|
||||
/// Demo - https://youtu.be/uVTV7Udx78k?t=1m33s Dynamic scalling of text or image (including button) based on curves. works on scrollrect scale so you can pretty much use it for any ui type.
|
||||
/// Sourced from - https://bitbucket.org/SimonDarksideJ/unity-ui-extensions/issues/83/ui_tweenscale
|
||||
/// Demo - https://youtu.be/uVTV7Udx78k?t=1m33s Dynamic scaling of text or image (including button) based on curves. works on scrollrect scale so you can pretty much use it for any ui type.
|
||||
/// Notes In some cases it can create spikes due to redrawing on change, it is recommended to use it on simple objects in separated canvases to avoid redrawing full canvas.
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ using System.Collections;
|
|||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Dynamic scalling of text or image (including button) based on curves
|
||||
/// Dynamic scaling of text or image (including button) based on curves
|
||||
///
|
||||
/// Fields
|
||||
/// - animCurve - animation curve for scale (if isUniform set to false, will apply only to X scale)
|
||||
|
|
Loading…
Reference in New Issue