Skip to content

Conversation

@sim-bz
Copy link
Contributor

@sim-bz sim-bz commented Jan 30, 2026

Purpose of this PR

Converted references from InstanceID to EntityID.
Added macro #if UNITY_6000_3_OR_NEWER to maintain backward compatibility.

Testing status

[Explanation of what’s tested, how tested and existing or new automation tests. Can include manual testing by self and/or QA. Specify test plans. Rarely acceptable to have no testing.]

  • Added an automated test
  • Passed all automated tests
  • Manually tested

Documentation status

[Overview of how documentation is affected by this change. If there is no effect on documentation, explain why. Otherwise, state which sections are changed and why.]

  • Updated CHANGELOG
  • Updated README (if applicable)
  • Commented all public classes, properties, and methods
  • Updated user documentation

Technical risk

low risk

Comments to reviewers

[Info per person for what to focus on, or historical info to understand who have previously reviewed and coverage. Help them get context.]

Package version

[Justification for updating either the patch, minor, or major version according to the semantic versioning rules]

  • Updated package version

@sim-bz sim-bz requested a review from glabute as a code owner January 30, 2026 18:46
@u-pr
Copy link
Contributor

u-pr bot commented Jan 30, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪

The PR involves a specific API migration (InstanceID to EntityId) for a newer Unity version. The changes are localized, small in scope, and guarded by preprocessor directives, making it relatively easy to verify for a developer familiar with the target API changes.
🏅 Score: 95

The code correctly handles API evolution using preprocessor directives to maintain backward compatibility. The changes are logical and follow standard upgrade patterns, with only a minor naming inconsistency found.
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Confusing Variable Naming

In the hierarchyWindowItemByEntityIdOnGUI lambda expression, the parameter is named instanceID, but the context (and usage in EditorUtility.EntityIdToObject) implies it is of type EntityId. Renaming this parameter to entityId would improve code clarity and prevent confusion regarding its type (integer vs struct).

EditorApplication.hierarchyWindowItemByEntityIdOnGUI += (instanceID, r) =>
  • Update review

🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr

@u-pr
Copy link
Contributor

u-pr bot commented Jan 30, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

Copy link
Collaborator

@glabute glabute left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov-github-com
Copy link

codecov-github-com bot commented Jan 30, 2026

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...emachine/Editor/Utility/ScriptableObjectUtility.cs 0.00% 8 Missing ⚠️
....cinemachine/Editor/Windows/CinemachineSettings.cs 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1096      +/-   ##
==========================================
- Coverage   17.34%   17.32%   -0.02%     
==========================================
  Files         209      209              
  Lines       23692    23699       +7     
==========================================
- Hits         4110     4107       -3     
- Misses      19582    19592      +10     
Flag Coverage Δ
cinemachine_MacOS_2022.3 ?
cinemachine_MacOS_6000.0 ?
cinemachine_MacOS_6000.2 ?
cinemachine_MacOS_6000.3 ?
cinemachine_MacOS_6000.4 ?
cinemachine_Ubuntu_2022.3 ?
cinemachine_Ubuntu_6000.0 ?
cinemachine_Ubuntu_6000.2 ?
cinemachine_Ubuntu_6000.3 ?
cinemachine_Ubuntu_6000.4 ?
cinemachine_Windows_2022.3 17.38% <0.00%> (-0.01%) ⬇️
cinemachine_Windows_6000.0 17.27% <0.00%> (-0.01%) ⬇️
cinemachine_Windows_6000.2 17.27% <0.00%> (-0.01%) ⬇️
cinemachine_Windows_6000.3 17.27% <0.00%> (-0.01%) ⬇️
cinemachine_Windows_6000.4 17.27% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
....cinemachine/Editor/Windows/CinemachineSettings.cs 38.46% <0.00%> (-0.38%) ⬇️
...emachine/Editor/Utility/ScriptableObjectUtility.cs 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants