Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Packages/src/Editor/Utils/RaycastGridAnnotator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,12 @@ 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
// GetInstanceID is obsolete-as-error on Unity 6000.4+; the lower 32 bits of EntityId equal the legacy instance id.
return (int)EntityId.ToULong(collider!.gameObject.GetEntityId());
#else
return collider!.gameObject.GetInstanceID();
#endif
}

private static RaycastClusterSample CreateClusterSample(
Expand Down
Loading