Unity 6.2 以降 6.5 未満で TreeView が Obsolete 警告を出すのに対応 - #2810
Merged
ousttrue merged 1 commit intoJul 6, 2026
Conversation
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.' ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 の場合でも新版を利用するようにし、警告が出力されないようにしました。発生していた警告は次のようなものでした。