-
-
Notifications
You must be signed in to change notification settings - Fork 171
Initial check-in for Unity 6 update - thank you Unity for continuing to support Unity UI #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…to support Unity UI
…e with TextMeshPro - will investigate alternatives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Unity UI Extensions package to support Unity 6, marking a major version bump from 2.3.3-pre.1 to 3.0.0-pre.1. The changes primarily involve removing version-specific conditional compilation directives and obsolete components that are no longer needed with Unity 6's requirement for TextMeshPro.
Key changes:
- Updated minimum Unity version from 2020.3 to 6000.0 (Unity 6)
- Added dependency on com.unity.ugui 2.0.0
- Removed legacy Unity Text components in favor of TextMeshPro (TMP_Text)
- Cleaned up obsolete version checks and conditional compilation directives
- Removed deprecated text effects (NicerOutline, BestFitOutline, LetterSpacing, MonoSpacing, CylinderText, CurvedText)
Reviewed changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated version to 3.0.0-pre.1, minimum Unity to 6000.0, added ugui 2.0.0 dependency |
| Runtime/Scripts/Utilities/UI_ScrollRectOcclusion.cs | Fixed spacing in comment text |
| Runtime/Scripts/Utilities/UIExtensionsInputManager.cs | Simplified input system version check |
| Runtime/Scripts/Utilities/PPIViewer.cs | Removed legacy Text support, TMP_Text only |
| Runtime/Scripts/Utilities/ExtensionsToggle.cs | Removed obsolete Unity 2018.3 version check |
| Runtime/Scripts/ToolTips/ToolTip.cs | Removed version checks, standardized to TMP_Text, improved code formatting |
| Runtime/Scripts/ToolTips/HoverTooltip.cs | Removed legacy Text support |
| Runtime/Scripts/ToolTips/BoundTooltip/BoundTooltipItem.cs | Changed to TMP_Text, removed version checks |
| Runtime/Scripts/Layout/UIVerticalScroller.cs | Added property accessors, moved initialization logic, removed version checks |
| Runtime/Scripts/Layout/UIHorizontalScroller.cs | Formatting fixes, removed version checks for Text components |
| Runtime/Scripts/Layout/FlowLayoutGroup.cs | Removed unused import, fixed indentation |
| Runtime/Scripts/Effects/UIParticleSystem.cs | Removed Unity 2019.1 version check, formatting fixes |
| Runtime/Scripts/Effects/SoftMaskScript.cs | Removed legacy Text support |
| Runtime/Scripts/Effects/NicerOutline.cs | Deleted obsolete effect (not supported in Unity 2022+) |
| Runtime/Scripts/Effects/MonoSpacing.cs | Deleted obsolete effect |
| Runtime/Scripts/Effects/LetterSpacing.cs | Deleted obsolete effect |
| Runtime/Scripts/Effects/Gradient2.cs | Removed version checks for Unity 2021+ features, formatting fixes |
| Runtime/Scripts/Effects/CylinderText.cs | Deleted obsolete effect |
| Runtime/Scripts/Effects/CurvedText.cs | Deleted obsolete effect |
| Runtime/Scripts/Effects/CurlyUI/CUIText.cs | Reverted to legacy Text (inconsistent with other changes) |
| Runtime/Scripts/Effects/BestFitOutline.cs | Deleted obsolete effect |
| Runtime/Scripts/Controls/TextPic.cs | Standardized to TMP_Text, improved code formatting throughout |
| Runtime/Scripts/Controls/Sliders/BoxSlider.cs | Removed Unity 2018.3 version check, formatting fix |
| Runtime/Scripts/Controls/SelectionBox/SelectionBox.cs | Improved code formatting, removed FindObjectsOfType version check |
| Runtime/Scripts/Controls/SelectionBox/ExampleSelectable.cs | Removed legacy Text support |
| Runtime/Scripts/Controls/Segment.cs | Removed legacy Text support |
| Runtime/Scripts/Controls/ReorderableList/ReorderableListDebug.cs | Removed version checks for TMP_Text and FindObjectsByType |
| Runtime/Scripts/Controls/ComboBox/DropDownListButton.cs | Removed legacy Text support |
| Runtime/Scripts/Controls/ComboBox/ComboBox.cs | Changed to TMP_InputField, simplified component lookup |
| Runtime/Scripts/Controls/ComboBox/AutoCompleteComboBox.cs | Changed to TMP_InputField, simplified component lookup |
| Runtime/Scripts/Controls/ColorPicker/HexColorField.cs | Changed to TMP_InputField, updated event listener, simplified variable declaration |
| Runtime/Scripts/Controls/ColorPicker/ColorSampler.cs | Fixed variable naming from oncolorSelected to onColorSelected |
| Runtime/Scripts/Controls/ColorPicker/ColorLabel.cs | Fixed parameter typo (sateration → saturation), removed legacy Text support |
| Runtime/Scripts/Controls/ColorPicker/ColorImage.cs | Fixed indentation |
| README.md | Added release note for version 2.4.0 |
| Examples~ | Updated submodule commit reference |
| Editor/UIExtensionsMenuOptions.cs | Simplified input system check, removed FindObjectOfType version checks, fixed indentation |
| Editor/CanvasGroupActivator.cs | Removed FindObjectsOfType version check |
| Editor/CUIImageEditor.cs | Removed Unity 2022.1 version check for Handles.FreeMoveHandle |
| .github/workflows/development-buildandtestupmrelease.yml | Updated CI to only test Unity 6, adjusted build targets |
Comments suppressed due to low confidence (2)
Runtime/Scripts/ToolTips/ToolTip.cs:1
- The error message is incomplete. It should specify 'Text' or 'TMP_Text component' instead of just ' component'.
Runtime/Scripts/Layout/UIVerticalScroller.cs:1 - These new public properties expose internal fields without any validation or documentation. Consider adding XML documentation comments to explain their purpose and any constraints on their usage, especially since they allow external code to modify internal state.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Add listeners to keep text (and color) up to date | ||
| hexInputField.onEndEdit.AddListener(UpdateColor); | ||
| hexInputField.onValueChanged.AddListener(UpdateColor); |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from 'onEndEdit' to 'onValueChanged' which will cause UpdateColor to be called on every character typed, not just when editing is complete. This could impact performance and may cause unexpected behavior if color parsing fails on incomplete hex values.
| #if UNITY_2022_1_OR_NEWER | ||
| [RequireComponent(typeof(TMPro.TMP_Text))] | ||
| #else | ||
| [RequireComponent(typeof(Text))] |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file still references the legacy 'Text' component instead of 'TMPro.TMP_Text', which is inconsistent with the rest of the PR where all Text components have been replaced with TextMeshPro. This should be updated to use TMP_Text for consistency with Unity 6 requirements.
| _rectTransform = GetComponent<RectTransform>(); | ||
| _inputRT = _rectTransform.Find("InputField").GetComponent<RectTransform>(); | ||
| _mainInput = _inputRT.GetComponent<InputField>(); | ||
| _mainInput = GetComponentInChildren<TMPro.TMP_InputField>(); |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If GetComponentInChildren returns null, the next line will throw a NullReferenceException. The original code had _inputRT set first, which would have caught this earlier. Consider adding a null check or reordering to validate _mainInput before using it.
| _mainInput = GetComponentInChildren<TMPro.TMP_InputField>(); | |
| _mainInput = GetComponentInChildren<TMPro.TMP_InputField>(); | |
| if (_mainInput == null) | |
| { | |
| Debug.LogError("ComboBox: No TMP_InputField found in children. Please ensure a TMP_InputField is present."); | |
| success = false; | |
| return success; | |
| } |
| _rectTransform = GetComponent<RectTransform>(); | ||
| _inputRT = _rectTransform.Find("InputField").GetComponent<RectTransform>(); | ||
| _mainInput = _inputRT.GetComponent<InputField>(); | ||
| _mainInput = GetComponentInChildren<TMPro.TMP_InputField>(); |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If GetComponentInChildren returns null, the next line will throw a NullReferenceException. The original code had _inputRT set first, which would have caught this earlier. Consider adding a null check or reordering to validate _mainInput before using it.
| _mainInput = GetComponentInChildren<TMPro.TMP_InputField>(); | |
| _mainInput = GetComponentInChildren<TMPro.TMP_InputField>(); | |
| if (_mainInput == null) | |
| { | |
| Debug.LogError("AutoCompleteComboBox: No TMP_InputField found in children. Initialization failed."); | |
| return false; | |
| } |
| protected void UpdateQuadImage() | ||
| { | ||
| #if UNITY_EDITOR | ||
| if (UnityEditor.PrefabUtility.GetPrefabAssetType(this) == UnityEditor.PrefabAssetType.Regular) |
Copilot
AI
Dec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from checking PrefabType.Prefab to PrefabAssetType.Regular, which is the correct API for Unity 2018.3+. However, the condition logic might need review - the original code checked '!= Prefab' while this checks '== Regular', which may not be equivalent for all prefab types.
| if (UnityEditor.PrefabUtility.GetPrefabAssetType(this) == UnityEditor.PrefabAssetType.Regular) | |
| if (UnityEditor.PrefabUtility.GetPrefabAssetType(this) != UnityEditor.PrefabAssetType.NotAPrefab) |
Unity UI Extensions - Pull Request
Overview
The beginnings of an overhaul to validate support for Unity 6, possibly even some new controls.
Changes
Breaking Changes
Related Submodule Changes
Testing status
Manual testing status