Skip to content

fix: resolve GetInstanceID deprecation in Unity 6.4+ - #845

Merged
hadashiA merged 1 commit into
hadashiA:masterfrom
chikacc:fix/getinstanceid-obsolete
Mar 29, 2026
Merged

hadashiA merged 1 commit into
hadashiA:masterfrom
chikacc:fix/getinstanceid-obsolete

Conversation

@chikacc

@chikacc chikacc commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Description

Unity 6.4 has deprecated Object.GetInstanceID() (warning), and it will be treated as a compilation error (CS0619) from Unity 6.5 onwards.

This PR addresses the issue by:

  • Using GetEntityId() for Unity 6.4 and newer versions.
  • Maintaining backward compatibility for older Unity versions using conditional compilation (#if UNITY_6000_4_OR_NEWER).

Changes:

  • Modified LifetimeScope.cs to use the appropriate unique identifier API based on the Unity version.

@vercel

vercel Bot commented Mar 28, 2026

Copy link
Copy Markdown

@chikacc is attempting to deploy a commit to the hadashia's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hadashiA

Copy link
Copy Markdown
Owner

thx!

@hadashiA
hadashiA merged commit add0db2 into hadashiA:master Mar 29, 2026
1 of 11 checks passed
@chikacc
chikacc deleted the fix/getinstanceid-obsolete branch May 1, 2026 04:04
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.

2 participants