How to save info in different instances of widgets

The one major issue is this, when the widget tries to find its silo:

As mentioned above, GetAll does not guarantee array order. It may work now, but it may not work tomorrow, or it may not work after packaging, or it may stop working correctly as soon as you add one more actor or reload the scene. It cannot be relied on.

The widget’s job is to display stuff, not look it up:

  • the silo has the data
  • the silo creates and references the widget
  • the silo updates its widget

Generally speaking, it should be the silo that drives it all, and the widget merely displays what the silo asks it to. The rest of the script interacts with the silo only.


Consider this pseudoscript:

  • the silo widget

  • the silo:

It stores a direct reference to its widget and updates it when necessary.


If you ever feel you need the Get(All)Actor of Class node to look up a specific instance, things have gone wrong. This is (almost) never necessary and a lot of alternatives exist - which method to choose is circumstantial, thouigh. What I suggested above is Direct Communication, where an actor stores a reference to another entity - here, a widget. If you wanted the widget to talk back at the actor who owns it, you’d employ an Event Dispatcher.