Hello! It has been quite a while sine I have used NodeCanvas and after an update old code that used to work no longer does. The code was responsible for taking a list of graphs and injecting them in runtime. It would also work for graphs within graphs, which is the part that no longer works. I had to use a few hacks to accomplish this a while back, but it seems maybe code has changed around the parts the hack was there for. I will post screenshots for you to get a better idea of what I’m talking about.
As you can see from the screenshots, the code is trying to take a graph owner and use a custom overrides component to assign the graphs. The SubGraphOverrides just uses a list of graphs assigned on the prefab. It finds nodes by a tag and creates a new graph and assigns it to the nestedGraph variable. None of these error logs ever happen and I have debugged that the nestedGraph does get assigned. Somewhere along the line, the nestedGraph loses its connection and nothing is assigned to it anymore. My guess is it has something to do with the instanced graphs.
I appreciate any insight you have, I will continue to look into a fix.
If there is a better way to accomplish this now, please let me know. It is important that these graphs be assigned at runtime and not linked up in the graph themselves for modularity.
If I understand correctly and the goal here is for sub-graphs to be dynamically assigned, maybe you have missed it, but the target graph used by a sub-graph node, is actually a BBParameter, which means that it can be linked to a Blackboard variable already, thus it can dynamically be changed during runtime simply by assigning the Blackboard variable to a different graph reference 🙂
Please let me know if this is what you are after?
Cheers!