-
Notifications
You must be signed in to change notification settings - Fork 87
Update tests to fix InstanceID warnings #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
PR Code Suggestions ✨Explore these optional code suggestions:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
|||||||||
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## master #646 +/- ##
=======================================
Coverage 36.05% 36.05%
=======================================
Files 277 277
Lines 34900 34900
=======================================
Hits 12584 12584
Misses 22316 22316
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| #else | ||
| return (ulong)id; | ||
| #endif | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of casting an int into a ulong - which can cause loss of precision somwhere, you could define an ID type based on the #ifdef
#if UNITY_6000_4_OR_NEWER
using UObjectID = UnityEngine.EntityId;
#else
using UObjectID = System.Int32;
#endif
DO NOT FORGET TO INCLUDE A CHANGELOG ENTRY
Purpose of this PR
follow up of https://github.cds.internal.unity3d.com/unity/unity/pull/91122
I
GetInstanceID is obsolete in 6000_4 and newer.
Also, conversion from entityId to int.
Needed to update tests
Links
N/A
Comments to Reviewers
n/A