Skip to content

Unity 6.5, 6.6 support - update to use new Unity API - #536

Open
RunoLight wants to merge 1 commit into
Unity-UI-Extensions:releasefrom
RunoLight:release
Open

RunoLight wants to merge 1 commit into
Unity-UI-Extensions:releasefrom
RunoLight:release

Conversation

@RunoLight

Copy link
Copy Markdown

Unity UI Extensions - Pull Request

Overview

Updated the package to support Unity 6.6 API changes while preserving backward compatibility with older Unity versions through conditional compilation.

This includes the new totalMax parameter in LayoutGroup.SetLayoutInputForAxis, the new maxWidth / maxHeight members in ILayoutElement, and removal of deprecated useLegacyMeshGeneration assignments on Unity 6.6+.

Changes

  • Updated SetLayoutInputForAxis calls in FlowLayoutGroup and TableLayoutGroup for Unity 6.6+:

    • Added LayoutUtility.DefaultMaxSize for layouts without an upper size limit.
    • Set max == preferred for tables with fixed column widths.
    • Set an unlimited max for vertically flexible table layouts (flexible = 1).
  • Added conditional compilation to keep the existing 4-argument SetLayoutInputForAxis API on Unity versions older than 6.6.

  • Updated ExtensionMethods and ColorPickerPresets to use GetEntityId / GetInstanceID with appropriate Unity version checks.

  • Implemented maxWidth and maxHeight in UIPrimitiveBase for Unity 6.6+, using LayoutUtility.DefaultMaxSize without an upper limit.

  • Removed useLegacyMeshGeneration assignments from UIPrimitiveBase and Sector on Unity 6.6+, where the property is deprecated.

  • Preserved compatibility with older Unity versions through #if UNITY_6000_6_OR_NEWER and #if UNITY_6000_5_OR_NEWER.

  • Fixes: BUG: Object.GetInstanceID()' is obsolete for 6000.5.6f1 #532

  • Fixes: BUG: Compilation problems for classes implementing ILayoutElement in 6000.6 #534

Breaking Changes

  • No breaking changes.

Existing projects using Unity versions older than 6.6 continue to use the previous APIs through conditional compilation.

Related Submodule Changes

  • N/A

Testing status

  • No tests have been added.

Manual testing status

  • Verified compilation against Unity 6.6 with the updated LayoutGroup.SetLayoutInputForAxis API.
  • Verified that FlowLayoutGroup and TableLayoutGroup use the correct max values on Unity 6.6+.
  • Verified UIPrimitiveBase implements the new ILayoutElement.maxWidth and maxHeight members on Unity 6.6+.
  • Verified deprecated useLegacyMeshGeneration assignments are excluded on Unity 6.6+.
  • Verified conditional compilation keeps the previous API calls for Unity versions older than 6.6.
  • Recompiled the project in the Unity Editor to ensure the previous CS7036 errors caused by the changed SetLayoutInputForAxis signature are resolved.

with conditional compilation to preserve back compability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Compilation problems for classes implementing ILayoutElement in 6000.6 BUG: Object.GetInstanceID()' is obsolete for 6000.5.6f1

1 participant