Use non-generic TryComp() for metadata & transform (#28133)
This commit is contained in:
@@ -30,8 +30,8 @@ public sealed partial class PathfindingSystem
|
||||
|
||||
if (end.GraphUid != start.GraphUid)
|
||||
{
|
||||
if (!TryComp<TransformComponent>(start.GraphUid, out var startXform) ||
|
||||
!TryComp<TransformComponent>(end.GraphUid, out var endXform))
|
||||
if (!TryComp(start.GraphUid, out TransformComponent? startXform) ||
|
||||
!TryComp(end.GraphUid, out TransformComponent? endXform))
|
||||
{
|
||||
return Vector2.Zero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user