How to link dynamically added seekers?

So I have some PGC levels that work fine if I load the levels with the enemy seekers already in the scene. I’m coding my enemy spawning scripts, but I’ve hit a snag: any enemy added to the scene dynamically doesn’t seem to use the AStarPath data. It finds a valid path of length 1 with 0 nodes. These are prefabs, and the only thing I have to do to the newly spawned enemies is tell them the player transform is the ultimate target. Is there something I’m missing? Do I need to link the A* gameobject to them (or vice versa) as well?
I’m using the free version with a grid graph that I scan on level load. I’m also scanning the graph during Start() on my A* gameobject, and adding the dynamic seekers during the level’s Awake() function. So technically they are in the scene before the rescan…
Any ideas? Thanks!

As is becoming my norm, I have found a workaround that I am unsure of the validity of:
Since the seekers don’t seem to like hooking into the graph for the scene if you instantiate them from the prefabs folder, I have simply placed a single copy of them in the scene to use as references, which I then deactivate in the spawning script once I’ve cached pointers to them. I instantiate new GameObject clones based on the in scene instances instead of the prefabs from the Resources folder.

It’s a slightly ugly hack, but it works. I’d love to find out the few methods I could use to couple the seekers to the gridgraph if anyone happens to just know…

Cheers

Hm…
I have no idea why they are not finding the correct paths…
There is nothing that you should have to do other than assign the target object.

Are there any error messages logged? (e.g if you enable A* Inspector -> Settings -> Path Log Mode = Normal).

I figured it out. It was in my code. I had a typo in my enemy spawner. I accidently set the target to transform instead of player.transform.
It worked fine after that :stuck_out_tongue: