Tilemap + a*pathfinding + destroyable objects

I was able to find is how to make it work. And it works…but what i can’t figure out how to make it work with game objects that have collsions2d and able to find it on path and hit it.
Destroy it and then continue to its path to destination.

What it currently does it just colides and tries to go thru object.
My problem is how to detect if its destroyable? How to move to it and attack it.
I can’t find anything about it…
like if path is blocked? Does it contain collision? Dose it contain IDamagable (interface)?
How to find on currentWaypoint on that specific tile while unit is blocked to find any tile that is can be damaged?

Here is example:
Spawn
Look for path.
Path is blocked
Check if there Damagable is on current path
Go to damagable
attack then check for path (in case we destryed)
Path found.
Go to orginal destination.

Hi

Sorry for the late reply.
The most common way to do this is to make all destroyable objects tag the nodes below them with a specific tag (say a tag named “Destructible”). Then on the Seeker component, you give that tag a very high penalty so that the agent will not move over it unless absolutely necessary. Then when you move your agent, you can use a raycast to see if it is about to walk into a destructible object. If so, you know that there was no better path and you can let the agent start to attack that object.

See also Working with tags - A* Pathfinding Project