Make prevPath available in Seeker.cs

I use lastCompletedVectorPath in Seeker.cs to drive a LineRenderer in the Game view. It’s only a small tweak on my end to make this public whenever I upgrade.

Would you consider making this public? Or, even better, changing prevPath from private to protected. That way it’d be easy to create a derived Seeker class that can expose the info cleanly.

How are you building your path? If you’re using a built-in movement script or something like AIDestinationSetter, you have options here- mainly just creating an ABPath yourself and then assigning it to your agent. From there you can use that same path for your line rendering?

Mainly just bringing it up as an alternative :smiley:

1 Like

Hey, thanks. I’m using RichAI wired into Ultimate Character Controller. I can always regenerate the path and get the same result, but I like tapping into lastCompletedVectorPath, it’s what A* shows in the Scene view, and I piggyback that for a Game View debug line using LineRenderer.

This is only a small annoyance because after package updates I have to flip that field to public again. Since the info is handy, I figured others might find it useful too, and it seems like a trivial change, so I raised this as a feature request.

If there’s a downside I’m missing or you don’t see the value, no worries, feel free to ignore.

Would Path.vectorPath do the trick then? If it doesn’t really match 1:1 then I’d want to raise the suggestion to Aron since it seems at least someone has found use for that specific variable, which I think warrants a look at :smiley:

Hi

One downside is that this field only exists in the editor, it’s completely stripped out of standalone builds, to avoid the (minor) memory and performance cost.

Have you considered ai.GetRemainingPath instead?