Can a child blueprint have two parent blueprints?

This is really important for what I am trying to do in my game. I have some actors in my game, and I want them each to have two parent actor blueprints.

To be more specific, in my game, I have an inventory system actor, and building system actor. I already have child actors with the inventory system actor as their parent actor, but I’d also like to add the building system actor as their parent actor. If that description didn’t make sense just ignore it lol it doesn’t matter too much. I really just need to know whether or not a child blueprint can have two parent blueprints.

Is this possible?

Thanks!

Not possible. The closest you can get is one parent plus any number of Interfaces.

1 Like

Ugh, alright thanks. I’ll have to figure out another way then. I am pretty sure I will still be able to do this but it just won’t be as straightforward.

Another question actually. Say that there are three actors. Let’s say that there is Actor 1, which is the main parent. Then you have actor 2, which is the child of actor 1. Then you have actor 3, which is the child of actor 2.

Will Actor 3 still have Actor 1’s properties?

1 Like

Yes, unless those properties have explicitly been set as private somewhere upstream (in which case it still has the properties, but they cannot be accessed via Actor 3).

1 Like

And a sidenote: if you have some sort of shared logic that needs to be available in many different classes that are otherwise unrelated, look into ActorComponents. That shifts your architectural decisions from inheritance to composition instead, which is often preferable and more flexible.

2 Likes

Thanks! And how would I know if the properties were set as private or public?

It’s a checkbox in the Details pane for the property/variable in question. Defaults to false, so if you haven’t noticed it before, it’s probably already public.