Describe the bug
Following up on #1118: the fix there covered ComponentPropertySerializer.cs and HierarchyService.cs, but RaycastGridAnnotator.cs has the same Object.GetInstanceID() call and was missed. On Unity 6000.5.3f1 this still fails with CS0619 since GetInstanceID() is obsolete-as-error starting Unity 6.4 (6000.4).
Error Logs
Library\PackageCache\io.github.hatayama.uloopmcp@dbad4312a1f2\Editor\Utils\RaycastGridAnnotator.cs(376,20): error CS0619: 'Object.GetInstanceID()' is obsolete: 'GetInstanceID is deprecated. Use GetEntityId instead. This will be removed in a future version.'
Location
https://github.com/hatayama/unity-cli-loop/blob/main/Packages/src/Editor/Utils/RaycastGridAnnotator.cs#L376
internal static int CreateClusterKey(Collider collider)
{
Debug.Assert(collider != null, "Collider is required for raycast clustering.");
// A placement area can use several colliders on one object; one annotation should describe the clickable object.
return collider!.gameObject.GetInstanceID();
}
Suggested fix
Apply the same UNITY_6000_4_OR_NEWER conditional pattern used in the #1118 fix for the other two files:
internal static int CreateClusterKey(Collider collider)
{
Debug.Assert(collider != null, "Collider is required for raycast clustering.");
// A placement area can use several colliders on one object; one annotation should describe the clickable object.
#if UNITY_6000_4_OR_NEWER
return (int)UnityEngine.EntityId.ToULong(collider!.gameObject.GetEntityId());
#else
return collider!.gameObject.GetInstanceID();
#endif
}
Environment
- Unity: 6000.5.3f1
- Package: io.github.hatayama.uloopmcp 2.2.0 (git install)
Repro steps
- Install the package via git URL on Unity 6000.5.3f1 (or any Unity 6000.4+ version)
- Let the Editor resolve/compile the package
- Observe CS0619 compile error at
RaycastGridAnnotator.cs:376
Describe the bug
Following up on #1118: the fix there covered
ComponentPropertySerializer.csandHierarchyService.cs, butRaycastGridAnnotator.cshas the sameObject.GetInstanceID()call and was missed. On Unity 6000.5.3f1 this still fails withCS0619sinceGetInstanceID()is obsolete-as-error starting Unity 6.4 (6000.4).Error Logs
Location
https://github.com/hatayama/unity-cli-loop/blob/main/Packages/src/Editor/Utils/RaycastGridAnnotator.cs#L376
Suggested fix
Apply the same
UNITY_6000_4_OR_NEWERconditional pattern used in the #1118 fix for the other two files:Environment
Repro steps
RaycastGridAnnotator.cs:376