Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e198e57
Initial check-in for Unity 6 update - thank you Unity for continuing …
SimonDarksideJ Nov 27, 2025
332dda2
Merge branch 'development' of https://github.com/Unity-UI-Extensions/…
SimonDarksideJ Dec 2, 2025
c7df19f
Update workflows from base update
SimonDarksideJ Dec 2, 2025
37edee5
Unity 6 script clean-up (remove legacy dependencies)
SimonDarksideJ Dec 6, 2025
7412188
Update package definition for Unity 6 focus
SimonDarksideJ Dec 6, 2025
70af128
Update examples checkout
SimonDarksideJ Dec 6, 2025
e665951
Updated Picker control and samples to latest
SimonDarksideJ Dec 6, 2025
7da6948
Update UIVertical Scroller to be more efficient for U6 and update exa…
SimonDarksideJ Dec 6, 2025
4db311f
Clear out old text controls, no longer valid. Update combobox scripts
SimonDarksideJ Dec 6, 2025
42d4bd1
Reverted Curly Text back to old Text component as it is not compatibl…
SimonDarksideJ Dec 6, 2025
cedeaf3
All scenes tested, 2 issues remain, re-orderable list and selection box
SimonDarksideJ Dec 6, 2025
7ecf81b
Added GridRawImage & UI_Knob2
SimonDarksideJ Dec 16, 2025
2cc6c20
UISegmentedCIrcle control
SimonDarksideJ Dec 16, 2025
b51af02
Added UI Graphic Selector
SimonDarksideJ Dec 17, 2025
fe0221a
Merge branch 'development' of https://github.com/Unity-UI-Extensions/…
SimonDarksideJ May 28, 2026
332e8af
Renamed Segment to SegmentedControlSegment:
SimonDarksideJ Jun 5, 2026
95e680a
Replaced meta files from original control, not usual pattern but reso…
SimonDarksideJ Jun 6, 2026
0995b2d
Addressed NRE in Reorderable List
SimonDarksideJ Jun 8, 2026
8879268
Patch debug option to allow both Text and TMPro
SimonDarksideJ Jun 8, 2026
a237e69
Update layout groups to rebuild on disable/enable
SimonDarksideJ Jun 8, 2026
6ae5406
Resolved stacking issue with the Reorderable list when moving the ele…
SimonDarksideJ Jun 8, 2026
d05610c
Added a close line option which finished the line off with a "closer"…
SimonDarksideJ Jun 8, 2026
ee8cb1a
Resolved race condition issue in regards to the ScrollSnap control wh…
SimonDarksideJ Jun 8, 2026
dfd8c46
Patch the HSS/VSS against a potential divide by zero error is the scr…
SimonDarksideJ Jun 8, 2026
3e23f36
Update GetCurrentPage to be more resilient
SimonDarksideJ Jun 8, 2026
4d46fb4
Patch licenses
SimonDarksideJ Jun 9, 2026
8c8eb8f
Merge branch 'feature/Unity6' of https://github.com/Unity-UI-Extensio…
SimonDarksideJ Jun 9, 2026
f7f64e9
Resolve out of bounds issues with the Infinite scroll control
SimonDarksideJ Jun 16, 2026
a1fee91
Updated UI Particle system to address #486/#487 requiring a new "Cull…
SimonDarksideJ Jun 16, 2026
2b25363
Patch for #477 plus some general housekeeping for maintaining TMPro/T…
SimonDarksideJ Jun 16, 2026
b592f53
Update SegmentedCircle controls with new meta files and update exampl…
SimonDarksideJ Jun 16, 2026
24d69db
Update scrollsnap to be more resilient to rescaling and patch full sc…
SimonDarksideJ Jun 16, 2026
4765f79
Address layout issues with the flow layout group
SimonDarksideJ Jun 16, 2026
f877f96
Remove unused variable in UITextureLineRenderer
SimonDarksideJ Jun 16, 2026
50640b9
Patch GridRawImage for editor and update automation steps
SimonDarksideJ Jun 17, 2026
05050bd
Patch workflow to FIX the release due to obsolete errors in 6000.5
SimonDarksideJ Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/development-buildandtestupmrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,21 @@ env:

jobs:
test-unity-build:
name: Test Unity UPM Build
name: Test Unity UPM Build (${{ matrix.os }}, Unity ${{ matrix.unity-version }})
runs-on: ${{ matrix.os }}
if: always()
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
unity-version:
- 6000.0.x
- 6000
- '6000.0.x'
- '6000.1'
- '6000.2'
- '6000.3'
include:
# - os: ubuntu-latest
# build-targets: StandaloneLinux64, Android
- os: ubuntu-latest
build-targets: StandaloneLinux64, Android
- os: windows-latest
build-targets: StandaloneWindows64, Android
- os: macos-latest
Expand All @@ -49,18 +51,20 @@ jobs:
unity-version: ${{ matrix.unity-version }} # overrides version in version-file
build-targets: ${{ matrix.build-targets }}

- run: |
- name: Inspect Unity setup outputs
shell: pwsh
run: |
echo "Step Outputs:"
echo "steps.unity-setup.unity-hub-path: '${{ steps.unity-setup.outputs.unity-hub-path }}'"
echo "steps.unity-setup.unity-editors: '${{ steps.unity-setup.outputs.unity-editors }}'"
echo "steps.unity-setup.unity-editor-path: '${{ steps.unity-setup.outputs.unity-editor-path }}'"
echo "steps.unity-setup.unity-project-path: '${{ steps.unity-setup.outputs.unity-project-path }}'"

echo "Environment Variables:"
echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
echo "UNITY_HUB_PATH: '$env:UNITY_HUB_PATH'"
echo "UNITY_EDITORS: '$env:UNITY_EDITORS'"
echo "UNITY_EDITOR_PATH: '$env:UNITY_EDITOR_PATH'"
echo "UNITY_PROJECT_PATH: '$env:UNITY_PROJECT_PATH'"

- uses: buildalon/activate-unity-license@v2
if: runner.environment == 'github-hosted'
Expand Down
310 changes: 310 additions & 0 deletions Editor/CustomRectTransformEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
///Credit Dmitry (mitay-walle)
///Sourced from - https://github.com/mitay-walle/com.mitay-walle.rect-transform-editor

using System;
using System.Reflection;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using Object = UnityEngine.Object;

namespace Plugins.UI.Editor
{
[CustomEditor(typeof(RectTransform), true), CanEditMultipleObjects]
public class CustomRectTransformEditor : UnityEditor.Editor
{
private const string NATIVE_EDITOR_TYPE = "UnityEditor.RectTransformEditor";
private static PropertyInfo _rectDrivenObject = typeof(RectTransform).GetProperty("drivenByObject"
, BindingFlags.Public | BindingFlags.Instance);
private UnityEditor.Editor editorInstance;
private static Type nativeEditorType;
private MethodInfo onSceneGui;
private MethodInfo onDisable;
private Action<SceneView> drawAnchorsOnSceneViewDelegate;

private Rect _rect = new Rect(45, 65, 45, 18);
private Rect _rect2 = new Rect(70, 25, 20, 18);
private Rect _rect3 = new Rect(70, 45, 20, 18);
private Rect _rect4 = new Rect(0, 65, 45, 18);

private void OnEnable()
{
if (targets.Length == 0 || targets[0] == null) return;

Initialize();
if (nativeEditorType == null) return;
if (editorInstance == null) return;

InitOnSceneGUIFix();
ExecuteOnSceneGUIFix();
try
{
if (editorInstance.targets.Length > 0 && editorInstance.targets[0] != null)
{
nativeEditorType.GetMethod("OnEnable",
BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic)
?.Invoke(editorInstance, null);
}
}
catch
{
}
}

private void Initialize()
{
if (nativeEditorType == null)
{
nativeEditorType = Assembly.GetAssembly(typeof(UnityEditor.Editor)).GetType(NATIVE_EDITOR_TYPE);
}

if (editorInstance)
{
CreateCachedEditor(targets, nativeEditorType, ref editorInstance);
}
else
{
editorInstance = CreateEditor(targets, nativeEditorType);
}
}

private void InitOnSceneGUIFix()
{
// fix recursive SceneView.duringSceneGui subscription, that affects performance
onSceneGui = nativeEditorType.GetMethod("OnSceneGUI", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
onDisable = nativeEditorType.GetMethod("OnDisable", BindingFlags.NonPublic | BindingFlags.Instance);
var method = nativeEditorType.GetMethod("DrawAnchorsOnSceneView", BindingFlags.NonPublic | BindingFlags.Instance);
drawAnchorsOnSceneViewDelegate = (Action<SceneView>)method.CreateDelegate(typeof(Action<SceneView>), editorInstance);
}

private void ExecuteOnSceneGUIFix()
{
SceneView.duringSceneGui -= drawAnchorsOnSceneViewDelegate;
}

public override void OnInspectorGUI()
{
editorInstance.OnInspectorGUI();

bool needMoveY = NeedMoveY();

Rect rect = _rect;
rect.y += needMoveY ? 20 : 0;

// Code here
if (GUI.Button(rect, "Snap"))
{
foreach (Object targ in targets)
{
if (targ is RectTransform rectTr)
{
Undo.RecordObject(targ, "Snap to parent");
SnapToParent(rectTr);
EditorUtility.SetDirty(targ);
}
}
}

rect = _rect4;
rect.y += needMoveY ? 20 : 0;

if (GUI.Button(rect, "New"))
{
foreach (Object targ in targets)
{
if (targ is RectTransform rectTr)
{
CreateEmptyParentRect(rectTr);
}
}
}

if (targets.Length > 1)
{
GUI.enabled = false;
}

rect = _rect2;
rect.y += needMoveY ? 20 : 0;

if (GUI.Button(rect, "C"))
{
ComponentUtility.CopyComponent(target as RectTransform);
}

GUI.enabled = true;

rect = _rect3;
rect.y += needMoveY ? 20 : 0;

if (GUI.Button(rect, "P"))
{
foreach (Object targ in targets)
{
Undo.RecordObject(targ, "Paste");
ComponentUtility.PasteComponentValues(targ as RectTransform);
EditorUtility.SetDirty(targ);
}
}
}

private void OnSceneGUI()
{
if (!(bool)target)
return;

onSceneGui.Invoke(editorInstance, null);
}

private void OnDisable()
{
SceneView.duringSceneGui -= drawAnchorsOnSceneViewDelegate;
if (editorInstance)
{
onDisable?.Invoke(editorInstance, null);
DestroyImmediate(editorInstance);
}
}

private static void SnapToParent(RectTransform rect)
{
rect.pivot = new Vector2(.5f, .5f);
rect.localScale = Vector3.one;
rect.localPosition = Vector3.zero;
rect.localRotation = Quaternion.identity;
rect.anchoredPosition = Vector2.zero;
rect.anchorMin = Vector2.zero;
rect.anchorMax = Vector2.one;
rect.sizeDelta = Vector2.zero;
}

public static void CreateEmptyParentRect(RectTransform rect)
{
GameObject go = new GameObject("Create Empty Parent");

ComponentUtility.CopyComponent(rect);
ComponentUtility.PasteComponentAsNew(go);

Undo.RecordObject(rect, "Create Empty, Reparent");

Undo.RegisterCreatedObjectUndo(go, "Create Empty Parent");

RectTransform rect2 = go.transform as RectTransform;

PlaceSameAs(go.transform, rect, true, true, true);
ComponentUtility.PasteComponentValues(rect2);
Undo.SetTransformParent(rect, go.transform, "Create Empty, Reparent");
SnapToParent(rect);

EditorUtility.SetDirty(rect);

Selection.activeGameObject = go;
EditorGUIUtility.PingObject(go);
}

private static void PlaceSameAs(Transform target, Transform source, bool copyName = false, bool undo = false,
bool setDirty = false)
{
if (!source) return;

if (undo && Application.isPlaying)
{
Undo.RecordObject(target, "PlaceSameAs");
if (copyName) Undo.RecordObject(target.gameObject, "PlaceSameAs");
}

VectorArray matrix = new VectorArray(source, false);
matrix.Apply(target);
if (undo)
{
Undo.SetTransformParent(target, source.parent, "PlaceSameAs");
}
else
{
target.SetParent(source.parent);
}

target.SetSiblingIndex(source.GetSiblingIndex());

if (copyName) target.name = source.name;

if (setDirty && Application.isPlaying)
{
EditorUtility.SetDirty(target);
if (copyName) EditorUtility.SetDirty(target.gameObject);
}
}

// ReSharper disable Unity.PerformanceAnalysis
private bool NeedMoveY()
{
bool value = false;
foreach (RectTransform target in targets)
{
if (NeedMoveY(target))
{
value = true;
break;
}
}

return value;
}

private bool NeedMoveY(RectTransform target) => _rectDrivenObject.GetValue(target) != null;
}

[Serializable]
public struct VectorArray
{
[SerializeField] public bool local;
[SerializeField] public Vector3 Pos;
[SerializeField] public Quaternion Rot;
[SerializeField] public Vector3 Scale;

public VectorArray(Transform tr, bool local)
{
this.local = local;
if (!tr)
{
Pos = default;
Rot = default;
Scale = default;
}
else
{
Scale = local ? tr.localScale : tr.lossyScale;

if (local)
{
Pos = tr.localPosition;
Rot = tr.localRotation;
}
else
{
Pos = tr.position;
Rot = tr.rotation;
}
}
}

public void Apply(Transform tr)
{
if (local)
{
tr.localPosition = Pos;
tr.localRotation = Rot;
}
else
{
tr.position = Pos;
tr.rotation = Rot;
}

tr.localScale = Scale;
#if UNITY_EDITOR
if (!Application.isPlaying) EditorUtility.SetDirty(tr);
#endif
}
}
}
2 changes: 2 additions & 0 deletions Editor/CustomRectTransformEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Editor/GridRawImage.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading