add actor component at runtime?

Hey @avuio!

You may want to make sure that it isn’t being added!

Firstly, you want to test with printstrings. Put one before and one after your “Add Component”. The one after should pass in the return value from the “Add actor Component”.

If it gives a Static Mesh, make sure you’re attaching that static mesh with “Attach Component to Component/Actor.”

During gameplay, if you do this, press CTRL+F1 to get mouse control, then Eject. Find the player in the world outliner, and look at the details. If it is added it will show here.

The reason for all of this is that there is a very different fix for not creating something vs something getting created but not noticed, which is almost always the more common thing that has happened.

Hope that helps, get back with us with what you found out! :slight_smile:

1 Like