Can't load actors on Actor array

Im using UMG! And What Im trying to achieve is something similar to FnaF, is a widget where the player has the ability to switch and see between cameras.

I’ve been following the ‘Blueprint’ example by Epic which contains some examples of security cameras displayed on monitors, but this time Im using UMG.

So, I have 2 Widgets or UI, the first one is the main interface and this one loads the second interface, the second interface only has buttons, which will display image through the main interface, I know it sound confusing but, to make everything easier, I created and Actor Array on the second interface, so I can load the camera Blueprintas into the interface, now when I want to add the Blueprints, it… doesn’t work. I click on combobox to look for my Camera Blueprints, and well I can see them but when I click it, the combobox keeps displaying ‘None’ as if I didn’t select any asset. It’s driving me crazy because this is the only way I can get a reference from my camera blueprint through UMG.

P.S. Sorry about my english

If I understand the issue correctly… You can not create references for actors between streaming levels, or between levels and blueprints that are not placed in the world. There are multiple ways to handle this issue.

First way is to spawn the Widget through the level blueprint and send the cameras from there to the widget after it has been created. The second way is for the widget to get all actors of the camera class and filter them out, either using tags, names or some variable that you can identify them with. There are more ways of course, but those are the first that pops up in my mind.

First identify how you spawn your widget, then identify how you will be able to fetch the cameras and connect them to your widget on Construction/Spawn.

No, no. I never said something about level streaming, im Using UMG. To make things simpler, I just want to store my Blueprint cameras inside my widget, So I can have access to the “Scene Capture Component 2D” of each camera. My cameras are inherited from the Actor parent class, and they’re placed in the world.

BTW, I Can’t spawn widgets inside the world, I… just can’t, is not like a grab the asset and place it in the world.

Cross-level references was mentioned as an example of where references can’t be used, just as you can’t reference a placed actor from a level inside a widget. You have to dive into Blueprint to solve this one. It is easier to help you if you mention how and when you spawn the Widgets. Does it happen on interaction inside the level? If so, you can add the logic inside the actor that you place. This placed actor could then have the array of cameras you want to use, which is then transferred to the widget. Example below.

Placed Button Actor (has Camera Array) -> Spawns Widget on interaction OR gets the widget from for example the HUD class -> Gives Widget a reference to self or cameras -> Widget can now access the cameras

alternatively:

On Widget Construct -> Get All Actors of Class -> Cameras -> Create array

I hope you find a way to solve your specific problem.