Upstream merged enhancements from 4.6
Packaged new CylinderText component - Breyer Updated to V1.0.6.1 --HG-- branch : develop_5.3pull/413/head
commit
f74241cb13
|
@ -21,13 +21,13 @@ You can either download / fork the project to access the scripts, or you can dow
|
|||
### [Unity UI Extensions Unity 5.2 Asset](https://bitbucket.org/ddreaper/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/ddreaper/unity-ui-extensions/downloads/UnityUIExtensions-5.3.unitypackage) <- use this for 5.2.1P+ releases###
|
||||
|
||||
|
||||
##Getting Started##
|
||||
To get started with the project, here's a little guide:
|
||||
|
||||
[![View Getting Started Video](http://img.youtube.com/vi/sVLeYmsNQAI/0.jpg)](http://www.youtube.com/watch?v=sVLeYmsNQAI "Unity UI getting started video")
|
||||
---
|
||||
## Updates: ##
|
||||
|
||||
###Update 1.0.4###
|
||||
|
||||
[![View Getting Started Video](http://img.youtube.com/vi/oF48Qpaq3ls/0.jpg)](http://www.youtube.com/watch?v=oF48Qpaq3ls "Update 1.0.0.4 for the Unity UI Extensions Project")
|
||||
|
@ -36,6 +36,7 @@ To get started with the project, here's a little guide:
|
|||
Few minor fixes and a couple of additional scripts. Predominately created the new 5.3 branch to maintain the UI API changes from the 5.2.1 Patch releases. 5.3 package is 100% compatible with 5.2.1 Patch releases.
|
||||
|
||||
###Update 1.0.6###
|
||||
|
||||
[![View Getting Started Video](http://img.youtube.com/vi/jpyFiRvSmbg/0.jpg)](http://www.youtube.com/watch?v=jpyFiRvSmbg "Update 1.0.6 for the Unity UI Extensions Project")
|
||||
|
||||
* Added the awesome ReOrderable List control, plus some other minor bugfixes / changes.
|
||||
|
@ -43,6 +44,7 @@ Few minor fixes and a couple of additional scripts. Predominately created the n
|
|||
* New set of controls including some shader enhanced solutions
|
||||
* I've added a donate column to the lists. If you are getting great use out of a control, help out the dev who created it. Optional of course. Will update with links as I get them.
|
||||
|
||||
**1.0.6.1 - Minor update to enhance soft alpha mask and add cylinder text plus a fix to letter spacing**
|
||||
|
||||
---
|
||||
## Controls and extensions listed in this project are: ##
|
||||
|
@ -114,6 +116,7 @@ Effect | Description | Component Command | Notes | Donate | Credits
|
|||
**UIFlippable** | Image component effect to flip the graphic | UI / Effects / Extensions / UI Flippable ||| ChoMPHi
|
||||
**UIImageCrop** | Shader based mask system which clips to specific ranges X&Y | UI / Effects / Extensions / UI Image Crop ||| 00christian00
|
||||
**SoftAlphaMask** | Shader based mask able to clip images using an alpha mask | UI / Effects / Extensions / Soft Mask Script ||| NemoKrad
|
||||
**CylinderText** | Allows finers control of text spacing | UI / Effects / Extensions / Cylinder Text ||| Breyer
|
||||
|
||||
|
||||
## VR Components##
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
public override void ModifyMesh(VertexHelper vh)
|
||||
{
|
||||
if (! IsActive()) return;
|
||||
|
||||
int count = vh.currentVertCount;
|
||||
if (!IsActive() || count == 0)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0ec526a95e7733b4396be80d3e1df80e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -14,6 +14,9 @@ namespace UnityEngine.UI.Extensions
|
|||
public RectTransform MaskArea;
|
||||
RectTransform myRect;
|
||||
|
||||
[Tooltip("A Rect Transform that can be used to scale and move the mask - Does not apply to Text UI Components being masked")]
|
||||
public RectTransform maskScalingRect;
|
||||
|
||||
[Tooltip("Texture to be used to do the soft alpha")]
|
||||
public Texture AlphaMask;
|
||||
|
||||
|
@ -24,6 +27,9 @@ namespace UnityEngine.UI.Extensions
|
|||
[Tooltip("Implement a hard blend based on the Cutoff")]
|
||||
public bool HardBlend = false;
|
||||
|
||||
[Tooltip("Flip the masks alpha value")]
|
||||
public bool FlipAlphaMask = false;
|
||||
|
||||
Vector3[] worldCorners;
|
||||
|
||||
Vector2 AlphaUV;
|
||||
|
@ -108,6 +114,7 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
if (isText) // Need to do our calculations in world for Text
|
||||
{
|
||||
maskScalingRect = null;
|
||||
if (canvas.renderMode == RenderMode.ScreenSpaceOverlay && Application.isPlaying)
|
||||
{
|
||||
p = canvas.transform.InverseTransformPoint(MaskArea.transform.position);
|
||||
|
@ -126,9 +133,19 @@ namespace UnityEngine.UI.Extensions
|
|||
}
|
||||
else // Need to do our calculations in tex space for Image.
|
||||
{
|
||||
if (maskScalingRect != null)
|
||||
{
|
||||
maskRect = maskScalingRect.rect;
|
||||
}
|
||||
|
||||
// Get the centre offset
|
||||
centre = myRect.transform.InverseTransformPoint(MaskArea.transform.position);
|
||||
|
||||
if (maskScalingRect != null)
|
||||
{
|
||||
centre = myRect.transform.InverseTransformPoint(maskScalingRect.transform.position);
|
||||
}
|
||||
|
||||
// Set the scale for mapping texcoords mask
|
||||
AlphaUV = new Vector2(maskRect.width / contentRect.width, maskRect.height / contentRect.height);
|
||||
|
||||
|
@ -154,6 +171,7 @@ namespace UnityEngine.UI.Extensions
|
|||
mat.SetVector("_Max", max);
|
||||
|
||||
mat.SetTexture("_AlphaMask", AlphaMask);
|
||||
mat.SetInt("_FlipAlphaMask", FlipAlphaMask ? 1 : 0);
|
||||
|
||||
if (!isText) // No mod needed for Text
|
||||
mat.SetVector("_AlphaUV", AlphaUV);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
_CutOff("CutOff",Float) = 0
|
||||
[MaterialToggle]
|
||||
_HardBlend("HardBlend",Float) = 0
|
||||
_FlipAlphaMask("Flip Alpha Mask",int) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
|
@ -90,6 +91,8 @@
|
|||
float _Value;
|
||||
int _LeftToRight;
|
||||
|
||||
int _FlipAlphaMask = 0;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
|
@ -122,7 +125,6 @@
|
|||
{
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
|
||||
|
||||
// Do we want to clip the image to the Mask Rectangle?
|
||||
if (IN.texcoord.x < _Min.x || IN.texcoord.x > _Max.x || IN.texcoord.y < _Min.y || IN.texcoord.y > _Max.y) // Yes we do
|
||||
color.a = 0;
|
||||
|
@ -138,6 +140,9 @@
|
|||
a = 1;
|
||||
}
|
||||
|
||||
if (_FlipAlphaMask == 1)
|
||||
a = 1 - a;
|
||||
|
||||
color.a = a;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
_CutOff("CutOff",Float) = 0
|
||||
[MaterialToggle]
|
||||
_HardBlend("HardBlend",Float) = 0
|
||||
_FlipAlphaMask("Flip Alpha Mask",int) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
|
@ -92,6 +93,8 @@
|
|||
|
||||
bool _HardBlend = false;
|
||||
|
||||
int _FlipAlphaMask = 0;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
|
@ -139,6 +142,9 @@
|
|||
a = 1;
|
||||
}
|
||||
|
||||
if (_FlipAlphaMask == 1)
|
||||
a = 1 - a;
|
||||
|
||||
color.a = a * color.a;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Unity UI Extensions",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.6.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": [{
|
||||
|
|
Loading…
Reference in New Issue