I have a data structure that represents a simple terrain system and a number of filter algorithms that can be run on it. I want to be able to apply them in in any arbitrary order and have multiple instances with their own settings, basically how the Modfiers panel works in blender.
Currently, the filters are SO's that implement an interface. Then via Odin, I can expose a list of type <IFilter> to the inspector, and populate with SO instances in any order.
The script then iterates through the list, feeding the output from one to the input of the next.
List<Vertex2> generatedVerts = generateVerts(Settings settings) foreach (var filter in filterList) { generatedVerts = filter.Process(generatedVerts); } return generatedVerts; It works, but the problem is each entry in the list is associated with an instance of the SO. So if I want to tweak the settings, I have to keep track of which SO instance corresponds to which entry in the list and it gets confusing.
What I really want is an interface where I can visually reorder modules in the inspector, but they also have their own controls exposed rather than being driven by a separate SO, as I say like how it works with blender modifiers.
Can anyone suggest an approach for this? I do have access to Odin if that will help.