Static Variables

Hello Community,

I wanted to know if there are static variables (in blueprints).

I have a bunch of actors that need to override a variable based on a texture given at runtime. For this I have an texture to string hash map.

But I don’t want every actor to get a copy of the whole map, just a refrence to it.
Is this somehow possible?

There has be a way to set variables as static so they are shared instead of copied for every actor right?

Thanks in advance.

No. they arent, but if you want using some method to parse constant data you may
use pure functions that return hardcoded values instead.

Pure functions just give a results without execution pin.



Thank you for your input,

I ended up putting the functionality in the level blueprint.
It’s just better to work with imo.

This is the blueprint

I created a binding to the widget displaying the name and it works.

1 Like


There is also ‘get all widgets of class’…

If you just want to get all widgets of class WidgetPrompt
maybe you can use that instead getting all actors and then a for loop
to access each widget and cast it.

If get all widget of class works for you then you will save all the casts
as the returned array is from the widget class you query.

1 Like