How to "expose on spawn" a constructor param in C++?

it’s messy because it breaks the function-programming paradigm of 1task=1function and therefore will cause forgotten 2 lines big time.

BP has an option to expose on spawn, it seems very strange to me that it’s not available in C++ spawns. why would i need a 2nd/3rd function to call when crating the actor?

Logically it is completely possible to add inputs, for example adding an override for SpawnActorFromClass(), that has the input params you need, which just calls the other “classic” overrides and then runs the init+finishSpawn.

It seems too strange to not be implemented by Epic in the first place, that’s what caused me asking if there’s some more straight-forward way i am not aware of

1 Like