Unity 6.5対応: GetInstanceID→EntityId移行とUniTask 2.5.11更新 - #1
Merged
Conversation
Unity 6.4でObject.GetInstanceID()がdeprecatedになり、6.5では コンパイルエラーになるため、UNITY_6000_4_OR_NEWERで GetEntityId()/EntityIdキーに切り替える。6.3以前は従来どおり GetInstanceID()/intを使うので挙動は変わらない。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Unity 6.5でUniTaskのEditor拡張(UniTaskTrackerTreeView)が TreeView系APIのobsoleteエラーでコンパイル不能になる。 修正が入った2.5.11にピン留めする。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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.4で
Object.GetInstanceID()がdeprecatedになり、6.5ではコンパイルエラーになります(公式移行ガイド)。Unity 6.4/6.5のプロジェクトからこのパッケージを利用するとエラーが出るため対応します。変更内容
GetInstanceID → EntityId 移行(PageContainer / ModalContainer / SheetContainer)
Of(RectTransform)でIDを取得し、staticなDictionary<int, XxxContainer>キャッシュのキーに使用)EntityIdはintへの一意な変換が存在しないため、キー型ごと切り替える必要があり、#if UNITY_6000_4_OR_NEWERでTransformIdエイリアス(EntityId/System.Int32)を分岐GetInstanceID()/intを使うので挙動は変わりませんUniTask 2.5.11 へ更新
Unity 6.5ではUniTaskのEditor拡張(
UniTaskTrackerTreeView.cs)がTreeView系APIのobsoleteエラー化でコンパイル不能になります。修正(Cysharp/UniTask@0d304f1)が入った2.5.11にピン留めしました。検証
Unityバッチモード(
-batchmode -nographics -quit)でコンパイルチェックを実施:error CS0件 — 後方互換維持error CS0件 / obsolete警告なし。API Updaterによるソース書き換えも発生せず、#if分岐が正しく機能🤖 Generated with Claude Code