Skip to content

Unity 6.2 以降 6.5 未満で TreeView が Obsolete 警告を出すのに対応 - #2810

Merged
ousttrue merged 1 commit into
vrm-c:masterfrom
saturday06:fix-unity-6.2-tree-view-warnings
Jul 6, 2026
Merged

Unity 6.2 以降 6.5 未満で TreeView が Obsolete 警告を出すのに対応#2810
ousttrue merged 1 commit into
vrm-c:masterfrom
saturday06:fix-unity-6.2-tree-view-warnings

Conversation

@saturday06

@saturday06 saturday06 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Unity 6.2 の時点で、非Genericな TreeView が Obsolete となり警告が出るようになりました。 これを抑制します。

Unity 6.5 でそのクラスは削除されたため、 #2803#if UNITY_6000_5_OR_NEWER を用いて Unity 6.5 以降はGeneric版の TreeView<int> に置き換わるようになっています。

この #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<int> 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<InstanceID> to get the proper typing.'

Unity 6.2 の時点で、非Genericな `TreeView` が Obsolete となり警告が出るようになりました。これを抑制します。

Unity 6.5 でそのクラスは削除されたため、 vrm-c#2803 で `#if UNITY_6000_5_OR_NEWER` を用いて Unity 6.5 以降はGeneric版の `TreeView<int>`  に置き換わるようになっています。

この `#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<int> 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<InstanceID> to get the proper typing.'
```

@ousttrue ousttrue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
obsolete from 6.2
ref #2804

@ousttrue
ousttrue merged commit 95efed0 into vrm-c:master Jul 6, 2026
2 of 3 checks passed
@saturday06
saturday06 deleted the fix-unity-6.2-tree-view-warnings branch July 16, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants