I wrote a few component scripts and would like to add them to the player pawn under certain conditions.
Here is something I did as an experiment:
I added a new health component script during runtime to the player, it seems to work. Health deducts correctly.
I have seen that plenty of times in many of the blueprint nodes I use. Unless someone else has evidence to the contrary, I’d say they’re safe to use. I haven’t had any problems with any that I’ve been using.
I’m fairly certain that this is nothing to do with adding components at runtime, instead it’s most likely telling you never to call that function in C++ as it’s only for use with the internal blueprint parsing… There’s zero problems with adding components at runtime, as that’s what blueprint does really well. It’s referring to the “UK2Node_AddComponent” function so clearly it’s making sure that you never call that function manually in C++.