I want to know if this is possible. I have an AI parent class. In it, I want to have it get a reference to the possessed actor. I want to have a bunch of children of this blueprint that do different things, but I don’t want to keep pulling a reference. I want the parent class to pull the reference and pass it to all the children.
children classes have access to the reference as long as it is not set to private.
you wont see the reference in the my blueprints panel by default though. You need to click the eye icon (or i think its a gear cog in ue5) and select “show inherited” to see that reference.
If you searched in the graph though like this " var get reference name" you should find it.
The variable I can grab, but the reference I assign to that variable does not seem to carry over to the child. Is that possible? I want it to get a reference to the possessed pawn in the parent, and I want the child to be able to work with that reference.
Whatever is assigned to a parent class variable will be available in any child class. Yet, the variable needs to be set to “Instance Editable” in the parent for any run time assigned values to be set.
Child OBJECTS do not inherit the values configured at runtime in parent OBJECTS.
Child CLASSES inherit the properties of their parent CLASSES.
It’s important to understand the distinction. You almost never use a child OBJECT for an AI controller (or any controller.) There is, generally, one controller, of the appropriate class, per Pawn being controlled, and thus, one per player, and one per NPC.