Casting. How do i know what to plug into "object" slot

Hi all,

So i’ve a little blueprint written (BP A). that contains an array filled with spawned actors

I’ve another blueprint written (BP B), that is trying to cast to that blueprint, get that array, and delete the actors inside of it.

My problem comes in that i dont know what to plug into the object slot. If i try player controller or player pawn it tells me that it does not inherit from these so it would always fail. Is their an easy way to find out what i actually need to plug into that object slot so it wouldnt always fail.


I know that either storing that Array from BP A inside the game instance, and then casting to it from BP B would be easier, and that i’m probably even better using a blueprint interface in BP B to tell BP A to do the delete command itself, and thats what i’ll probably do in the end, but just wanted to try and fill in a gap in my knowledge with the above question :slight_smile:

You need a reference to the BP_A.
How you get it depends on how you set those Blueprints. Are they dropped in the level, are they spawned? if spawned, from where…

If they are dropped, you could create a variable, editable, exposed on spawn and set thee reference n the detail panel.
If they are spawned from the same place, you could pass the reference of BP_A to BP_B from there…

Lot of possibilities, depend of your set up. But what you need to plug is a direct reference of this objet and no other.

Ah well these are all UMG elements talking to each other, that are all spawned in at the start of the level then hidden.

Thanks for the response though, at least i know now where my thinking should be for things like this :slight_smile: