Compare commits
10 Commits
e7babe0dd6
...
69c96ab471
Author | SHA1 | Date |
---|---|---|
|
69c96ab471 | |
|
884a8d63f1 | |
|
5f535e0431 | |
|
17b69878de | |
|
70f98806e9 | |
|
5ef4736e68 | |
|
9fbcd39b88 | |
|
6a68933e48 | |
|
4857492384 | |
|
796f66c310 |
|
@ -18,7 +18,7 @@ jobs:
|
||||||
- os: windows
|
- os: windows
|
||||||
unityVersion: 2019.4
|
unityVersion: 2019.4
|
||||||
build-target: Android
|
build-target: Android
|
||||||
- os: macos
|
- os: macOS
|
||||||
unityVersion: 2019.4
|
unityVersion: 2019.4
|
||||||
build-target: iOS
|
build-target: iOS
|
||||||
- os: windows
|
- os: windows
|
||||||
|
@ -30,7 +30,7 @@ jobs:
|
||||||
- os: windows
|
- os: windows
|
||||||
unityVersion: 2020.3
|
unityVersion: 2020.3
|
||||||
build-target: Android
|
build-target: Android
|
||||||
- os: macos
|
- os: macOS
|
||||||
unityVersion: 2020.3
|
unityVersion: 2020.3
|
||||||
build-target: iOS
|
build-target: iOS
|
||||||
- os: windows
|
- os: windows
|
||||||
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- os: windows
|
- os: windows
|
||||||
unityVersion: 2021.3
|
unityVersion: 2021.3
|
||||||
build-target: Android
|
build-target: Android
|
||||||
- os: macos
|
- os: macOS
|
||||||
unityVersion: 2021.3
|
unityVersion: 2021.3
|
||||||
build-target: iOS
|
build-target: iOS
|
||||||
- os: windows
|
- os: windows
|
||||||
|
@ -54,7 +54,7 @@ jobs:
|
||||||
- os: windows
|
- os: windows
|
||||||
unityVersion: 2022.2
|
unityVersion: 2022.2
|
||||||
build-target: Android
|
build-target: Android
|
||||||
- os: macos
|
- os: macOS
|
||||||
unityVersion: 2022.2
|
unityVersion: 2022.2
|
||||||
build-target: iOS
|
build-target: iOS
|
||||||
- os: windows
|
- os: windows
|
||||||
|
@ -101,12 +101,12 @@ jobs:
|
||||||
}
|
}
|
||||||
elseif ( $global:PSVersionTable.OS.Contains("Darwin") )
|
elseif ( $global:PSVersionTable.OS.Contains("Darwin") )
|
||||||
{
|
{
|
||||||
$hubPath = "/Applications/Unity Hub.app/Contents/MacOS/Unity Hub"
|
$hubPath = "/Applications/Unity Hub.app/Contents/macOS/Unity Hub"
|
||||||
$editorRootPath = "/Applications/Unity/Hub/Editor/"
|
$editorRootPath = "/Applications/Unity/Hub/Editor/"
|
||||||
$editorFileEx = "/Unity.app/Contents/MacOS/Unity"
|
$editorFileEx = "/Unity.app/Contents/macOS/Unity"
|
||||||
$directorySeparatorChar = "/"
|
$directorySeparatorChar = "/"
|
||||||
|
|
||||||
# /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless help
|
# /Applications/Unity\ Hub.app/Contents/macOS/Unity\ Hub -- --headless help
|
||||||
function unity-hub
|
function unity-hub
|
||||||
{
|
{
|
||||||
& $hubPath -- --headless $args.Split(" ") | Out-String -NoNewline
|
& $hubPath -- --headless $args.Split(" ") | Out-String -NoNewline
|
||||||
|
@ -218,7 +218,7 @@ jobs:
|
||||||
}
|
}
|
||||||
elseif ( $global:PSVersionTable.OS.Contains("Darwin") ) {
|
elseif ( $global:PSVersionTable.OS.Contains("Darwin") ) {
|
||||||
echo 'Building using Mac'
|
echo 'Building using Mac'
|
||||||
$editorFileEx = "/Unity.app/Contents/MacOS/Unity"
|
$editorFileEx = "/Unity.app/Contents/macOS/Unity"
|
||||||
$editorrunpath = Join-Path $editorRootPath $unityVersion $editorFileEx
|
$editorrunpath = Join-Path $editorRootPath $unityVersion $editorFileEx
|
||||||
|
|
||||||
function unity-editor {
|
function unity-editor {
|
||||||
|
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: macos
|
- os: macOS
|
||||||
build-target: iOS
|
build-target: iOS
|
||||||
- os: windows
|
- os: windows
|
||||||
build-target: Android
|
build-target: Android
|
||||||
|
|
|
@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||||
|
|
||||||
## Release 2.3 - Reanimation - 2022/02/07
|
## Release 2.3 - Reanimation - 2023/02/07
|
||||||
|
|
||||||
It has been a tough time for all since the last update, but things have been moving steadily along. In the past few months there has been a concerted effort to revamp and update the project ready for Unity 2022, as well as migrating the source repository over to GitHub and refreshing all the things.
|
It has been a tough time for all since the last update, but things have been moving steadily along. In the past few months there has been a concerted effort to revamp and update the project ready for Unity 2022, as well as migrating the source repository over to GitHub and refreshing all the things.
|
||||||
We hope the new release is better for everyone and we have paid close attention to the editor menus and places to find all the controls for this release.
|
We hope the new release is better for everyone and we have paid close attention to the editor menus and places to find all the controls for this release.
|
||||||
|
|
|
@ -209,6 +209,8 @@ There are almost 70+ extension controls / effect and other utilities in the proj
|
||||||
|NicerOutline|RaycastMask|UIFlippable|UIImageCrop|SoftAlphaMask|
|
|NicerOutline|RaycastMask|UIFlippable|UIImageCrop|SoftAlphaMask|
|
||||||
|CylinderText|UIParticleSystem|CurlyUI|Shine Effect|Shader Effects|
|
|CylinderText|UIParticleSystem|CurlyUI|Shine Effect|Shader Effects|
|
||||||
|
|
||||||
|
> Text Effects are not supported with TextMeshPro due to its architecture, try using the native TextMeshPro effects instead.
|
||||||
|
|
||||||
[Additional Components](https://unity-ui-extensions.github.io/Controls.html#additional-components)
|
[Additional Components](https://unity-ui-extensions.github.io/Controls.html#additional-components)
|
||||||
|
|
||||||
|ReturnKeyTrigger|TabNavigation|uGUITools|ScrollRectTweener|ScrollRectLinker|
|
|ReturnKeyTrigger|TabNavigation|uGUITools|ScrollRectTweener|ScrollRectLinker|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
/// Credit Breyer
|
/// Credit Breyer
|
||||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/#post-1777407
|
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/#post-1777407
|
||||||
|
#if !UNITY_2022_1_OR_NEWER
|
||||||
|
|
||||||
namespace UnityEngine.UI.Extensions
|
namespace UnityEngine.UI.Extensions
|
||||||
{
|
{
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
[RequireComponent(typeof(TMPro.TMP_Text))]
|
|
||||||
#else
|
|
||||||
[RequireComponent(typeof(Text))]
|
[RequireComponent(typeof(Text))]
|
||||||
#endif
|
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[AddComponentMenu("UI/Effects/Extensions/Curved Text")]
|
[AddComponentMenu("UI/Effects/Extensions/Curved Text")]
|
||||||
public class CurvedText : BaseMeshEffect
|
public class CurvedText : BaseMeshEffect
|
||||||
|
@ -87,3 +84,4 @@ namespace UnityEngine.UI.Extensions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -1,14 +1,11 @@
|
||||||
/// adaption for cylindrical bending by herbst
|
/// adaption for cylindrical bending by herbst
|
||||||
/// Credit Breyer
|
/// Credit Breyer
|
||||||
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/#post-1777407
|
/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/#post-1777407
|
||||||
|
#if UNITY_2022_1_OR_NEWER
|
||||||
|
|
||||||
namespace UnityEngine.UI.Extensions
|
namespace UnityEngine.UI.Extensions
|
||||||
{
|
{
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
[RequireComponent(typeof(TMPro.TMP_Text))]
|
|
||||||
#else
|
|
||||||
[RequireComponent(typeof(Text))]
|
[RequireComponent(typeof(Text))]
|
||||||
#endif
|
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[AddComponentMenu("UI/Effects/Extensions/Cylinder Text")]
|
[AddComponentMenu("UI/Effects/Extensions/Cylinder Text")]
|
||||||
public class CylinderText : BaseMeshEffect
|
public class CylinderText : BaseMeshEffect
|
||||||
|
@ -57,3 +54,4 @@ namespace UnityEngine.UI.Extensions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -40,7 +40,7 @@ use HTML-like tags in your text. Try it out, you'll see what I mean. It doesn't
|
||||||
break down entirely, but it doesn't really do what you'd want either.
|
break down entirely, but it doesn't really do what you'd want either.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
#if !UNITY_2022_1_OR_NEWER
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace UnityEngine.UI.Extensions
|
namespace UnityEngine.UI.Extensions
|
||||||
|
@ -74,6 +74,11 @@ namespace UnityEngine.UI.Extensions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Awake()
|
||||||
|
{
|
||||||
|
Debug.Log($"Awake, [{m_spacing}]");
|
||||||
|
}
|
||||||
|
|
||||||
public override void ModifyMesh(VertexHelper vh)
|
public override void ModifyMesh(VertexHelper vh)
|
||||||
{
|
{
|
||||||
if (! IsActive()) return;
|
if (! IsActive()) return;
|
||||||
|
@ -81,11 +86,8 @@ namespace UnityEngine.UI.Extensions
|
||||||
List<UIVertex> verts = new List<UIVertex>();
|
List<UIVertex> verts = new List<UIVertex>();
|
||||||
vh.GetUIVertexStream(verts);
|
vh.GetUIVertexStream(verts);
|
||||||
|
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
var text = GetComponent<TMPro.TMP_Text>();
|
|
||||||
#else
|
|
||||||
var text = GetComponent<Text>();
|
var text = GetComponent<Text>();
|
||||||
#endif
|
|
||||||
if (text == null)
|
if (text == null)
|
||||||
{
|
{
|
||||||
Debug.LogWarning("LetterSpacing: Missing Text component");
|
Debug.LogWarning("LetterSpacing: Missing Text component");
|
||||||
|
@ -98,28 +100,6 @@ namespace UnityEngine.UI.Extensions
|
||||||
float alignmentFactor = 0;
|
float alignmentFactor = 0;
|
||||||
int glyphIdx = 0;
|
int glyphIdx = 0;
|
||||||
|
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
switch (text.alignment)
|
|
||||||
{
|
|
||||||
case TMPro.TextAlignmentOptions.BottomLeft:
|
|
||||||
case TMPro.TextAlignmentOptions.MidlineLeft:
|
|
||||||
case TMPro.TextAlignmentOptions.TopLeft:
|
|
||||||
alignmentFactor = 0f;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TMPro.TextAlignmentOptions.BottomJustified:
|
|
||||||
case TMPro.TextAlignmentOptions.MidlineJustified:
|
|
||||||
case TMPro.TextAlignmentOptions.TopJustified:
|
|
||||||
alignmentFactor = 0.5f;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TMPro.TextAlignmentOptions.BottomRight:
|
|
||||||
case TMPro.TextAlignmentOptions.MidlineRight:
|
|
||||||
case TMPro.TextAlignmentOptions.TopRight:
|
|
||||||
alignmentFactor = 1f;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
switch (text.alignment)
|
switch (text.alignment)
|
||||||
{
|
{
|
||||||
case TextAnchor.LowerLeft:
|
case TextAnchor.LowerLeft:
|
||||||
|
@ -140,7 +120,6 @@ namespace UnityEngine.UI.Extensions
|
||||||
alignmentFactor = 1f;
|
alignmentFactor = 1f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int lineIdx=0; lineIdx < lines.Length; lineIdx++)
|
for (int lineIdx=0; lineIdx < lines.Length; lineIdx++)
|
||||||
{
|
{
|
||||||
|
@ -193,3 +172,4 @@ namespace UnityEngine.UI.Extensions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -40,17 +40,14 @@ use HTML-like tags in your text. Try it out, you'll see what I mean. It doesn't
|
||||||
break down entirely, but it doesn't really do what you'd want either.
|
break down entirely, but it doesn't really do what you'd want either.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
#if !UNITY_2022_1_OR_NEWER
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace UnityEngine.UI.Extensions
|
namespace UnityEngine.UI.Extensions
|
||||||
{
|
{
|
||||||
[AddComponentMenu("UI/Effects/Extensions/Mono Spacing")]
|
[AddComponentMenu("UI/Effects/Extensions/Mono Spacing")]
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
[RequireComponent(typeof(TMPro.TMP_Text))]
|
|
||||||
#else
|
|
||||||
[RequireComponent(typeof(Text))]
|
[RequireComponent(typeof(Text))]
|
||||||
#endif
|
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
///Summary
|
///Summary
|
||||||
/// Note, Vertex Count has changed in 5.2.1+, is now 6 (two tris) instead of 4 (tri strip).
|
/// Note, Vertex Count has changed in 5.2.1+, is now 6 (two tris) instead of 4 (tri strip).
|
||||||
|
@ -62,21 +59,15 @@ namespace UnityEngine.UI.Extensions
|
||||||
public bool UseHalfCharWidth = false;
|
public bool UseHalfCharWidth = false;
|
||||||
|
|
||||||
private RectTransform rectTransform;
|
private RectTransform rectTransform;
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
private TMPro.TMP_Text text;
|
|
||||||
#else
|
|
||||||
private Text text;
|
private Text text;
|
||||||
#endif
|
|
||||||
|
|
||||||
protected MonoSpacing() { }
|
protected MonoSpacing() { }
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
text = GetComponent<TMPro.TMP_Text>();
|
|
||||||
#else
|
|
||||||
text = GetComponent<Text>();
|
text = GetComponent<Text>();
|
||||||
#endif
|
|
||||||
if (text == null)
|
if (text == null)
|
||||||
{
|
{
|
||||||
Debug.LogWarning("MonoSpacing: Missing Text component");
|
Debug.LogWarning("MonoSpacing: Missing Text component");
|
||||||
|
@ -117,28 +108,6 @@ namespace UnityEngine.UI.Extensions
|
||||||
float alignmentFactor = 0;
|
float alignmentFactor = 0;
|
||||||
int glyphIdx = 0;
|
int glyphIdx = 0;
|
||||||
|
|
||||||
#if UNITY_2022_1_OR_NEWER
|
|
||||||
switch (text.alignment)
|
|
||||||
{
|
|
||||||
case TMPro.TextAlignmentOptions.BottomLeft:
|
|
||||||
case TMPro.TextAlignmentOptions.MidlineLeft:
|
|
||||||
case TMPro.TextAlignmentOptions.TopLeft:
|
|
||||||
alignmentFactor = 0f;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TMPro.TextAlignmentOptions.BottomJustified:
|
|
||||||
case TMPro.TextAlignmentOptions.MidlineJustified:
|
|
||||||
case TMPro.TextAlignmentOptions.TopJustified:
|
|
||||||
alignmentFactor = 0.5f;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TMPro.TextAlignmentOptions.BottomRight:
|
|
||||||
case TMPro.TextAlignmentOptions.MidlineRight:
|
|
||||||
case TMPro.TextAlignmentOptions.TopRight:
|
|
||||||
alignmentFactor = 1f;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
switch (text.alignment)
|
switch (text.alignment)
|
||||||
{
|
{
|
||||||
case TextAnchor.LowerLeft:
|
case TextAnchor.LowerLeft:
|
||||||
|
@ -159,7 +128,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
alignmentFactor = 1f;
|
alignmentFactor = 1f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
for (int lineIdx=0; lineIdx < lines.Length; lineIdx++)
|
for (int lineIdx=0; lineIdx < lines.Length; lineIdx++)
|
||||||
{
|
{
|
||||||
string line = lines[lineIdx];
|
string line = lines[lineIdx];
|
||||||
|
@ -222,3 +191,4 @@ namespace UnityEngine.UI.Extensions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -134,7 +134,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
start += ApplyText(m_Verts, vh, start);
|
start += ApplyText(m_Verts, vh, start);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ApplyOutlineNoGC(List<UIVertex> verts, Color color, float x, float y, VertexHelper vh, int startIndex)
|
private int ApplyOutlineNoGC(List<UIVertex> verts, Color32 color, float x, float y, VertexHelper vh, int startIndex)
|
||||||
{
|
{
|
||||||
int length = verts.Count;
|
int length = verts.Count;
|
||||||
for (int i = 0; i < length; ++i)
|
for (int i = 0; i < length; ++i)
|
||||||
|
|
|
@ -296,8 +296,6 @@ namespace UnityEngine.UI.Extensions
|
||||||
PopulateMesh (vh, pointsToDraw);
|
PopulateMesh (vh, pointsToDraw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private UIVertex[] CreateLineCap(Vector2 start, Vector2 end, SegmentType type)
|
private UIVertex[] CreateLineCap(Vector2 start, Vector2 end, SegmentType type)
|
||||||
|
@ -501,6 +499,10 @@ namespace UnityEngine.UI.Extensions
|
||||||
{
|
{
|
||||||
m_points = new Vector2[1];
|
m_points = new Vector2[1];
|
||||||
}
|
}
|
||||||
|
if (transform.GetComponent<RectTransform>().position != Vector3.zero)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("A Line Renderer component should be on a RectTransform positioned at (0,0,0), do not use in child Objects.\nFor best results, create separate RectTransforms as children of the canvas positioned at (0,0) for a UILineRenderer and do not move.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,10 @@ namespace UnityEngine.UI.Extensions
|
||||||
bool updateLine = false;
|
bool updateLine = false;
|
||||||
for (int i = 0; i < transforms.Length; i++)
|
for (int i = 0; i < transforms.Length; i++)
|
||||||
{
|
{
|
||||||
|
if (transforms[i] == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!updateLine && previousPositions[i] != transforms[i].position)
|
if (!updateLine && previousPositions[i] != transforms[i].position)
|
||||||
{
|
{
|
||||||
updateLine = true;
|
updateLine = true;
|
||||||
|
@ -60,6 +64,10 @@ namespace UnityEngine.UI.Extensions
|
||||||
// First, convert the pivot to worldspace
|
// First, convert the pivot to worldspace
|
||||||
for (int i = 0; i < transforms.Length; i++)
|
for (int i = 0; i < transforms.Length; i++)
|
||||||
{
|
{
|
||||||
|
if (transforms[i] == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
worldSpaces[i] = transforms[i].TransformPoint(thisPivot);
|
worldSpaces[i] = transforms[i].TransformPoint(thisPivot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,6 +91,10 @@ namespace UnityEngine.UI.Extensions
|
||||||
previousPositions = new Vector3[transforms.Length];
|
previousPositions = new Vector3[transforms.Length];
|
||||||
for (int i = 0; i < transforms.Length; i++)
|
for (int i = 0; i < transforms.Length; i++)
|
||||||
{
|
{
|
||||||
|
if (transforms[i] == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
previousPositions[i] = transforms[i].position;
|
previousPositions[i] = transforms[i].position;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue