Hey!
Graphs are generating wonderfully upon loading new Scene, but, if I move the Player within the same scene, the graph does not generate. Any ideas?
- Olafs
Hey!
Graphs are generating wonderfully upon loading new Scene, but, if I move the Player within the same scene, the graph does not generate. Any ideas?
can you be a bit more clear about what you’re experiencing?
The last one - there is no changes in the graph per se, it just, after reloading the scene [the same one] doe not generate.
I checked out A* Pathfinding Project: Graph Updates during Runtime, but that polygon thing seebs to be made for 2D, no? I have a Recast Graph.
Image: it does generate, but after taking an elevator [green line] the scene reloads [and moves Player up], but there is no graph anymore.
Hi
When re-loading the scene, do you keep the previous AstarPath object around?
Yep. I have it local in each scene. It stays there.
In Play mode, if I hit Scan, it generate fine.
So, I guess, my question would be - how to properly trigger the scan. And from where?
Not sure how your scene is set up. But if you want to trigger a scan during runtime, then you can call AstarPath.active.Scan()
after the new scene is loaded.
Where do I that bit, man?
As the Scene is already loaded and then just takes the pause to move the Player to another location within same scene, so… technically it is not REloading…
Sorry about being dumb.
Note to myself, how easy it was.
Seriously thought it is more complicated.
Just in case, we can do it with delay.
I hope it’ll work everywhere…