Skip to content

Unity6.5以降でGetInstanceIDが使えなくなるので修正 - #47

Closed
adarapata wants to merge 5 commits into
Haruma-K:masterfrom
adarapata:master
Closed

Unity6.5以降でGetInstanceIDが使えなくなるので修正#47
adarapata wants to merge 5 commits into
Haruma-K:masterfrom
adarapata:master

Conversation

@adarapata

Copy link
Copy Markdown
Contributor

背景

Unity 6.4で Object.GetInstanceID() がdeprecatedになり、6.5ではコンパイルエラーになります(公式移行ガイド)。Unity 6.4/6.5のプロジェクトからこのパッケージを利用するとエラーが出るため対応します。

変更内容

GetInstanceID → EntityId 移行(PageContainer / ModalContainer / SheetContainer)

  • 使用箇所は3ファイル各1箇所(Of(RectTransform) でIDを取得し、staticな Dictionary<int, XxxContainer> キャッシュのキーに使用)
  • EntityId はintへの一意な変換が存在しないため、キー型ごと切り替える必要があり、#if UNITY_6000_4_OR_NEWERTransformId エイリアス(EntityId / System.Int32)を分岐
  • 6.3以前は従来どおり GetInstanceID() / int を使うので挙動は変わりません

adarapata and others added 5 commits August 7, 2026 16:11
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>
Unity 6.5対応: GetInstanceID→EntityId移行とUniTask 2.5.11更新
manifestの#2.5.11ピンを外し、従来どおりブランチ追従に戻す。
lockはUnityで再解決したmaster(ceac8d6)で、Unity 6.5対応の
TreeView修正(0d304f1)は含まれている。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
UniTaskのバージョン固定を解除
@adarapata

adarapata commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

既出でした 🙏

@adarapata adarapata closed this Aug 7, 2026
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.

1 participant