Skip to content

fix: resolve TreeView deprecation in Unity 6.2+#376

Merged
neuecc merged 1 commit into
Cysharp:mainfrom
chikacc:main
May 19, 2026
Merged

fix: resolve TreeView deprecation in Unity 6.2+#376
neuecc merged 1 commit into
Cysharp:mainfrom
chikacc:main

Conversation

@chikacc

@chikacc chikacc commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Description

Unity 6 (6000.2) has deprecated the non-generic TreeView, TreeViewItem, and TreeViewState classes in UnityEditor.IMGUI.Controls.

  • Unity 6000.2+: Triggers obsolete warnings (CS0618).
  • Unity 6000.5+: Triggers obsolete compiler errors (CS0619).

Solution

Introduced type aliasing for these classes to their generic counterparts (TreeView<int>, etc.) using the #if UNITY_6000_2_OR_NEWER preprocessor directive.

  • Removes deprecation warnings in Unity 6000.2 and later.
  • Fixes build errors in Unity 6000.5 and later.

@neuecc

neuecc commented May 19, 2026

Copy link
Copy Markdown
Member

thank you, I'll release soon.

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.

2 participants