How to use level blueprint's variable (array) to display elements on a widget?

Hello!
I made a level with an array in it’s blueprint. I would like to display the elements of that array on a widget like a task list. How it is it possible? I tried cast to level, but it’s impossible if i know it correctly.

Or i would like to know how to use the cameras of other blueprints as player view port?
Because if that’s working then i can do my trick with global variables. Hopefully.

But i more interested in the first option.

Thanks for any help!

1 Like

Why not just make the widget from the level BP?

Is it possible? :open_mouth: Sorry i quite new. How can it be done?

1 Like

Exactly the same was as however you’re making the widget now, but just put the code in the level BP :slight_smile:

I’ll try! Thanks! :smiley:

Not gonna lie, I’m stuck. I use separate widget blueprints and i don’t know how put that into the level blueprint code.

I can make a separate Widget blueprint, use “Create widget” node, then i choose the mentioned widget blueprint in it as a class.
But i can’t make a widget in the level BP. Or at least i don’t know how.

Everything stays where you had it, except for ‘create widget’ and ‘add to viewport’, they go in the level BP.

That’s what i meant. I used the mentioned nodes in level blueprint.
My problem still stands, i have an array in level BP, but i can’t use data of that array in the widget. Is there a way to connect them?

1 Like

Well, because you’re making the widget in the level BP, you have a reference to it, and you could just copy a whole array in one go

Very nice, if i can ask for more of your help, then please check this out if that’s how it should look like?:


Because it’s looks like it’s not communicating, i tried to write out elements of the array with print string (+plus a for loop) but it’s seems empty.

Edit: I tried to print text even in levelBP and there it’s okay.

Thank you in advance!

It matters when you add it to the viewport

Obviously if you show it before you’ve set the elements, it won’t work :wink:

Thank you! I own you a cake or something! Thank you so much! :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.