Update Datatable (or any other datastructure) during editor time

So, I’m tryin to make an that can between different poi (points of interest) in the world, but i want to find a better way to store them. Currently im storing them in a usavegame, that gets them every time i start the game.

Aint there a way to automatically store them when I place them in the level or some other way that i aint currentl think about?

Hi @M411!

Outside of one very niche scenario, the only class capable of ticking in editor/updating on command in-editor is an Editor Utility Widget. Here is an example of how you could set up your logic:

I don’t think there is any way to update your Data Tables automatically, so in this example I’m using a data asset. This logic checks for all POI’s in your level and automatically adds all of them to a specified data asset (clearing the data asset before adding it).

This is a rough example, but there are many ways to expand on this and optimize it. Instead of checking your data asset every tick, if you set up a timed function, it could check every few seconds to every few minutes- or you could set it up as a button press instead.
Another optimization is instead of clearing the data asset every time, you could make sure it only deletes old POIs and adds new ones.

All of this will be done only in-editor though, so optimize as much or as little as you wish.

Since this example is done through an editor utility widget, you will just need to make sure it is loaded as a window in the background for it to run while you work.