Oncomponenthit C++

I’m not sure about this API specifically, but I know that in Unreal, the Constructor is only called once when the engine starts up to create the Class Default Object that future created objects are created from. This should update if the engine Hot Reloads, or if it’s closed down and starts up again. Any time I mess with the constructor, I try and reset the engine, just because I find that functionality gets weird if I don’t and I don’t know what’s updated vs old behaviour.

BeginPlay on the otherhand is when the game starts up, I tend to keep gameplay related things in BeginPlay, as the constructor is called in Editor time, and I just am unsure how well it handles those delegates. I’m sure that it works, I just feel like there is more room there for error on the Engine’s part I guess.

2 Likes