“I have different solutions to realize this, but these solutions are uncomfortable. The bad thing is using “Get all actors by class”. It is a slow function and cannot be run at every tick. And creating an dynamic array and add/delete trackers is something that i would avoid.”
Do you mean you want to avoid dynamic array because you think that is the only way to use it? My suggestion is to make it more object oriented, rather than have the minimap class assemble the array from the actors in the world, let each actor add itself to the array on spawn and remove itself from the array on destruction. So long as your not using threading this would be ideal/efficient and would avoid the use of “get all actors” method.