So in my project the player can add and remove hexagonal tiles to make an island. However I would like to stop them from being able to “split” the island in two.
When adding tiles this is easy enough (just make sure each tile connects to at least one other) but I cant think of a way for the UE4 to know that if the player deletes a tile it result in two district “islands”, so that it can block the action.
I’m not the best at explaining myself on reddit so hopefully the picture will make it clearer.
I don’t think unreal has anything like that for users. You could study graph algorithms to determine if your islands are connected and implement it yourself.
Actually there is a unreal build-in function for this. You can use FloodFill from AGraphStar and check if the tile you added is in NodePool. If it is, then you are connected.