Can't create an array of Actor Blueprints. Is it even possible?

Hello,

I’m trying to create an array of Blueprints within a widget but struggling to find a solution to this from other threads. My current setup uses modular BPs made up of several Static Meshes. In order to quickly iterate the layout of the level I use Arrays of SMs (with the appropriate tag) to change what is generated per modular BP (see this post for an example [UE4] Hallway Complex — polycount (June 7th, mid way down the page)).

I’m now looking to add lighting to the scene. I’ve tried the “use emissive as static lighting” and this gets me so far but because this is activated per SM in the BP I can’t set this on all the SMs in the BP as only one is present (the other SMs are generated/replaced using the SM array from within the widget). If I can use an array of BPs instead of SMs then I can attach static lights to the BPs and use these to better light the level. Is this possible as choosing Actor > Object Reference in the variable type doesn’t allow me to add BPs to it.

Current SM array setup (click a button to change the SM from an array):

Actor array doesn’t let me add Actor BPs:

I’m using Unreal 4.22 and my BP knowledge is limited. Any help is much appreciated!

Thanks.

I think you could use an actor class reference (purple) instead of object (blue).

You can add those actors to your array from the editor view port if you already have all the actors placed in the level. Just set the Instance Editable parameter of your Lampposts array to True in the details panel, and the array will be exposed to the editor.

You can then add your actor references to the array from the dropdown menu as shown here:

1 Like

@Stormrage256 I tried that and had no success unfortunately.

@silik1 Changing the class to the purple one worked but I got stumped a bit further down along. My other static mesh nodes have a “cast to staticmeshcomponent” followed by a “set Static Mesh” node at the end of the flow. Is there a “set Actor” node I can use? Here’s where I’m up to but it’s not working (or displaying the print text):

The top screenshots are not related to my problem!

I’m far from an expert in classes and inheritance.
This type “Actor class” doen’t point to any actual object in the world, it’s a reference to a class, if you want to use it in your world, you have to spawn it or create it, and then you get an actor reference (blue) which exist in the world.

Your project has two distinct “universes”.
The one where everything is just asset data and the other one where you have an active “World” with spawned instances in it…
It’s your responsibility to know which is which when you are writing blueprint “code”.

Back onto the learning curve I go! Thanks for your comments!