Nodelink2 within the same grid

Hi,

I’m having some issues with a single grid graph, using Nodelink2.

This image show an elevator component in the game. Each floor have a bounds that i update in code. That all seems to work, but the nodelink is only sometimes activated.

Here we got two node links in the rightmost elevator component, and one node link in the leftmost elevator component.
The grid looks like it’s connected, but i’m only able to get a path from the middle floor to the bottom floor. Never to/from the second floor.

Is it not a good idea to use node links within one single grid graph? What gives.

Odd. Everything looks correct in the bottom screenshot, though in the top screenshot it looks like it wasn’t connected properly.
What happens if you call

AstarPath.active.Scan();

after your node links have been generated?

Everything works fine if i call Scan(). But 've got a grid of 250*250, so it stalls the game a couple of frames, so i can’t really do that runtime. Can i Scan() async?

Oh. I realized there is definitely a bug here.
Everything would work fine if they were created from the beginning, but in this case they are created during runtime, and then there are certain cases where it won’t update some metadata.
Try to replace your NodeLink2.cs script with this: https://pastebin.com/w7Z9fuMp I think that should fix it.

I tried replace NodeLink2.cs, but unfortunately, the same issue. They are instantiated from the same prefab.

Hi

Would it be possible for you to share your project with me so I could have a look?

Sure, dm me an email address, and i can add it to the collab project in unity!