LayerGrids: creating custom node types

Hi A*,

Inside LayerGridGraphGenerator.cs there lives some code that looks like this:

		//Create all nodes
		nodes = new LevelGridNode[width*depth*layerCount];
		for (int i=0;i<nodes.Length;i++) {
			nodes[i] = new LevelGridNode (active);
			nodes[i].Penalty = initialPenalty;
		}

This code makes it very hard to create custom nodes for a custom grid w/o overriding the whole ScanInternal() method. Would it be possible to add an overridable CreateNodes() function that I can override in my own class?

Part of the benefit is that it’ll make it unnecessary to modify this code every time we merge in a new version of A*.

Yeah. I probably should do that. It was in there some time ago but it got lost in some refactoring I think.

Thanks very much! Looking forward to picking this up.

I second this request, it would be very useful for any graph type.

It seems the same issue exists in GridGenerator.cs too. Would it the feature be added any time soon?