Definition for neighbor

So hit a small bump in my road and in the pathfinder script in ExploreNeighbors method down in the last if statement I have a red line under the SECOND neighbor in reached.Add(neighbor.coordinates.neighbor);

Tells me that ‘Vector2Int’ does not contain a difinition for neighbor. I’ve looked around and Pretty sure it’s a simple fix but one I can not figure out.

Hi Luke11,

It sounds to me that coordinates is a Vector2Int and you’re trying to access a neighbor property that does not exist in the Vector2Int struct.

I might be able to provide more insight with a code sample.

Hope this helps

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms