Change NavMesh at Runtime without moving any Actors

Hello,

What I am doing is, as a skill, I can “dig” up blocks to gain dirt as a resource. To do that I make the block hidden in game, so that once it has been dug, it is no longer visible. This does not update the NavMesh as my character can still move over it. I need to keep the object physically in the same place so that when I try to use my other skill “bury” it will just disable is hidden in game instead of creating a new Actor.

I have a similar system working in Unity, where the GameObject has a NavAgent attached and when dug is set to enable the agent and carve out the NavMesh, and when filled with bury it disables the NavAgent and re-enables the visible mesh.

What would be the best way to do something similar in UE4?
I have tried moving the block down, this updates the NavMesh but then it doesn’t work if you click on the sides of the neighbouring blocks.

I have also searched for an answer but not found any that allow the changing of the NavMesh without moving any Actors.

Managed to find a way.

I added an invisible box component and made it ignore all collisions except the camera and visibility. I then did a check to see if the block had been dug (i.e. it had been moved down 100cms), if it had then I made sure the invisible box was in the space of the dug block.

This gave me a clickable blank area that updated the NavMesh to prevent walking over empty space, as well as allowing me to use this same block for when I need to bury it by simply moving it back to where it was.