I have an Actor that generates another actor every few seconds using the SpawnActor function. In most cases the function doesn’t spawn anything, but it didn’t use to do so. The timer is not the problem because I have a debug message that always shows when it has to.
It might be a collision issue, try adding this to your SpawnInfo SpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
Solved: I didn’t touch anything, the code just fixed itself after a few hours. I have no idea how that happens and I hate when Unreal does stuff like this.
it may not be fixed, hope it is but because the editor will keep stuff in memory between Play In Editor sessions, your loop may be able to spawn those actors. Once you close the editor or build a game it may not work.