PCG Custom graph inheritance

Hi, is there a way to use inheritance with PCG graphs? I want to leverage the advantages of PCG graphs but have some sorft of inheritance for it. The reason is that i have have always similar parameters and inputs for my graphs and the same nodes at the start. I set the parameters using c++. I could just always copy paste them but that sounds not like a good idear … what if i want to change them? I would need to adjust all the graphs … so is there any way to create like a custom type of graph with predefined inputs or make a subgraph as parameter or something like that (I would be fine to do this in c++ aswell if needed)? Here is an example of the my pcg graph:

Did you solve your issue? :slight_smile:

I did a quick test and it is possible to inherit from UPCGGraph but I’m not sure what to do after that - doesn’t seem to be any obvious way to create graphs from that.

What you could do is perhaps to collect your parameters in a struct and include that. Then you could process them in a custom PCG node (which I think you can do in c++ or blueprints) and then do whatever you want after that.

You would still have to duplicate the struct and the custom node, but I think duplicating two are better than 10+.

Hope it helps!

1 Like

thank you for the reply. I solved it similar to your suggestion. I created a DataAsset and used that to configure and have it be passed into the PCG grapth by parameter. Currently im not using a PCG graph for every asset any more. So for now im only using PCG in the background and configure everything in the DataAsset. For the PCG graph i had to create a custom Node in C++ that would create/assign meshes to the points.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.