A clean way to initialize the variables of an instantiated object at the start of a level ?

Hi, I am quite new with blueprints and Unreal Engine in general. I am working on an RTS game a bit similar in the concept to Battlefleet : Gothic Armada and am wondering what the best practice is to setup objects at the start of a level.

More specifically : I have a structure “struct_teams” which contains all the information about the different teams and that also has an array of arrays. Each sub array of struct_teams lists all the units controlled by a given team. I have anotherblueprint bp_spawner that spawns new units in the desired location (spawning position) and associates the spawns units with the team that owns the spawning point by adding them to the related team array.

I am trying to make this clean and modular so that I can use it in every level of the game and build good Unreal development habits. At the moment : I instantiate the spawner objects variables of my level from the BeginPlay event of the level blueprint. I looked into doing it in the construction script of my blueprint but to do so, the way I found was to reference the level variables in the spawner blueprint and it doesn’t allow giving specific team values to the different spawners. Is there a cleaner way to do it than what I am doing ?

Since the levels will be procedurally generated, making the instances publicly editable doesn’t seem to be an option, unless I am missing something ?

Thanks in advance for any feedback

Not sure if I totally understand the question.

Ticking “instance editable” and “expose on spawn” will make your properties visible within the SpawnActor node, and it is perfectly fine to do so even if “instance editable” doesn’t really make sense per se.

image