Passing a class into a function (Blueprint)
I have a blueprint function that runs on the server and spawns AI of the class type that I specify. I have several more specific class types that all live under a parent AI parent class.
I want to be able to pass in the more specific class type (not the parent) into the function so that once inside I can call just one "Spawn AI From Class" and feed that class in. I don't want to have a mess of a Spawn AI From Class node for each individual class.
Is this possible? And if so, how do I accomplish it.
asked Feb 04 '19 at 08:50 PM in Blueprint Scripting
Ofcorse it is, all types you seen in color pins can be set as variables and arguments in function, including the class. You can do that by searching participle base class of classes you want to pass in variable type selection, and once you find it click it and you have option to either use object or class type or asset version of it.So pick the class (purple one).
answered Feb 05 '19 at 12:08 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here