Add penalty to nodes on creation?

I am trying to a create point path with various penalties, depending on color for example, that the user lays down at runtime. I have so far made a point graph and instanced pieces of the path (as children of the pointgraph) as cubes colored black and yellow, the point being the yellow are “faster” as so the AI should prefer them.

My issue is besides the initial penalty, which would effect both colored paths, I cannot find out how to add a penalty to a given node when it is created.

I have read the documentation on changing penalties with graphupdateobjects but frankly its over my head and I dont need to change penalties, just set them once on a node. I also tried making multiple graphs with various initial penalties but they dont seem to see each other. Any help would be appretiated

Hi

If you know the node position, you can simply do something like:

AstarPath.active.GetNearest (somePosition).node.Penalty = 5000;