Currently I’ve got some simple blueprint-code that spawns the actor ‘Ball’. I then print the output of SpawnActor to see the name of the spawned actor which is -logically- ‘Ball_C_1’, ‘Ball_C_2’, etc.
Now here’s my issue. The SpawnActor has a ‘Collision Handling Override’. I’ve set it to “Do Not Spawn”, so when there’s something blocking the spawnpoint it will not spawn. Great, there’s no ball actor spawning now, however, SpawnActor DOES return the value ‘Ball_c_x’ (where x is number of balls spawned).
So what happens now is, when pressing the spawn button for example 20 times very fast, it will spawn ‘Ball_c_1’ and then count all the way to ‘Ball_c_20’. So now, when the spawnpoint is clear again, the next actual spawned ball will be called ‘Ball_c_21’.
My issue here is, why does SpawnActor return a value when it’s actually not spawning anything. Why does it not return something like a null? Is there a way I can catch this?