From 2445f9801722fb53de7eeb687034056917251d6e Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Sat, 4 Jul 2026 15:32:14 +0900 Subject: [PATCH] =?UTF-8?q?Unity=206.2=20=E4=BB=A5=E9=99=8D=206.5=20?= =?UTF-8?q?=E6=9C=AA=E6=BA=80=E3=81=A7=20TreeView=20=E3=81=8C=20Obsolete?= =?UTF-8?q?=20=E8=AD=A6=E5=91=8A=E3=82=92=E5=87=BA=E3=81=99=E3=81=AE?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unity 6.2 の時点で、非Genericな `TreeView` が Obsolete となり警告が出るようになりました。これを抑制します。 Unity 6.5 でそのクラスは削除されたため、 https://github.com/vrm-c/UniVRM/issues/2803 で `#if UNITY_6000_5_OR_NEWER` を用いて Unity 6.5 以降はGeneric版の `TreeView` に置き換わるようになっています。 この `#if` 条件を `UNITY_6000_2_OR_NEWER` に拡張することで、 6.5 未満かつ 6.2 の場合でも新版を利用するようにし、警告が出力されないようにしました。 発生していた警告は次のようなものでした。 ``` Packages\VRM10\Editor\Components\SpringBone\SpringBoneTreeView.cs(14,39): warning CS0618: 'TreeView' is obsolete: 'TreeView is now deprecated. You can likely now use TreeView instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView to get the proper typing.' ``` --- Packages/UniGLTF/Editor/UniHumanoid/MuscleInspectorEditor.cs | 2 +- .../VRM10/Editor/Components/SpringBone/SpringBoneTreeView.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/UniGLTF/Editor/UniHumanoid/MuscleInspectorEditor.cs b/Packages/UniGLTF/Editor/UniHumanoid/MuscleInspectorEditor.cs index dddc37da9..d17775906 100644 --- a/Packages/UniGLTF/Editor/UniHumanoid/MuscleInspectorEditor.cs +++ b/Packages/UniGLTF/Editor/UniHumanoid/MuscleInspectorEditor.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; -#if UNITY_6000_5_OR_NEWER +#if UNITY_6000_2_OR_NEWER using TreeView = UnityEditor.IMGUI.Controls.TreeView; using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem; using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState; diff --git a/Packages/VRM10/Editor/Components/SpringBone/SpringBoneTreeView.cs b/Packages/VRM10/Editor/Components/SpringBone/SpringBoneTreeView.cs index 0b1e44333..d46d01149 100644 --- a/Packages/VRM10/Editor/Components/SpringBone/SpringBoneTreeView.cs +++ b/Packages/VRM10/Editor/Components/SpringBone/SpringBoneTreeView.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using UnityEditor; using UnityEngine; -#if UNITY_6000_5_OR_NEWER +#if UNITY_6000_2_OR_NEWER using TreeView = UnityEditor.IMGUI.Controls.TreeView; using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem; using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;