NodeCanvas integrations

I bought an add-on for NodeCanvas with actions for Pathfinding. Many scripts are not working due to namespace conflict. Here is example. Script cannot find the RVOController

using NodeCanvas.Framework;
using ParadoxNotion.Design;
using Pathfinding.RVO;

namespace NodeCanvasAddons.AStarPathfinding.LocalAvoidance
{
[Category(“A* Pathfinding Pro/RVOController”)]
[Name(“Get Agent Time Horizon”)]
[Description(“Gets the agent time horizon for the RVOController”)]
[Icon(“PathfindingNWaypoint”)]
public class GetAgentTimeHorizonAction : ActionTask
{
[RequiredField]
[BlackboardOnly]
public BBParameter AgentTimeHorizon;

    [GetFromAgent]
    private RVOController _rvoController;

    protected override void OnExecute()
    {
        AgentTimeHorizon.value = _rvoController.agentTimeHorizon;
        EndAction(true);
    }
}

}

Hi

Are you using the free or the pro version of the package? The RVOController only exists in the pro version.

Pro of course, latest package

Here are errors, line by line; I might help you too see where lies the problem. shoould I contact support of publisher of the asset?

Assets/NodeCanvasAddons/AstarPathfinding/Actions/Nodes/DestroyNodeAction.cs(19,24): error CS0122: `Pathfinding.GraphNode.Destroy()’ is inaccessible due to its protection level

Assets/NodeCanvasAddons/AstarPathfinding/Actions/Nodes/RecalculateNodeConnectionCostsAction.cs(19,24): error CS1061: Type Pathfinding.GraphNode' does not contain a definition forRecalculateConnectionCosts’ and no extension method RecalculateConnectionCosts' of typePathfinding.GraphNode’ could be found. Are you missing an assembly reference?

Assets/NodeCanvasAddons/AstarPathfinding/Decorators/IteratePathNodes.cs(95,71): error CS0122: `Pathfinding.Path.pathID.get’ is inaccessible due to its protection level

Assets/NodeCanvasAddons/AstarPathfinding/Extensions/PathExtensions.cs(13,17): error CS0122: `Pathfinding.Path.duration’ is inaccessible due to its protection level

Hey,

I work for the company that makes the package in question so just wanted to chime in as I don’t think this is a problem for Aron to fix, although I noticed a few undocumented breaking changes.

  • Node.pathID is now internal (this makes it difficult to work out if a path that is currently cached is the same as a new path), I could do a comparison on the hashcode possibly to compare 2 paths… any advice on this one would be good

  • Node.duration is now internal, I can remove the action exposing that if users shouldnt be accessing it

  • Node.Destroy is now internal, not entirely sure how to best deal with this, I am happy to remove the action if end users should no longer be able to destroy nodes directly?

  • Node.RecalculateNodeConnectionCost no longer seems to exist

Any advice on the points above would be great Aron.

In terms of the RVOController conflict bits, it sounds like you have certain pragmas active in the actions package which will add polyfill classes to the free version so the actions dont cause compilation errors with the missing pro features (they would actually blow up if you tried to use pro actions with a free A* version).

Anyway we are updating the actions our side to account for the latest changes but ideally dont want to delete actions if there is a workaround for some of the points above.

Hi

Sorry for the late answer. I have been away for a bit.

Ah, it does seem like I have been a bit too eager to make things internal.

  • pathID, I assume you mean Path.pathID here? Fair enough, that can be made public again.
  • duration, same. I suppose it can come in useful sometimes.
  • Node.Destroy should be made public because otherwise users cannot make their own graph generators, however I don’t think this is an action you should have in the addon. The Destroy method (as the docs for it indicates) should only be called by the graph that created it, never by any other user code.
  • I think the RecalculateConnectionCost method was added by mistake at some point when I had been experimenting. That method never did anything, the implementation was literally empty. Sorry for the breaking change though, but you should be able to remove it safely from your integration. I have added an empty dummy method called RecalculateConnectionCosts to the latest version which is marked as obsolete.

I’m uploading a new version (4.2.4) soon (within a few hours) with these fixes.

1 Like

Thanks buddy, I have pushed out a new version which should be inline with the new version you have pushed out, thanks again :smiley:

1 Like