Add StaticMeshComponent at runtime
I want to add a dynamic number of static mesh components to an actor at a specific event during runtime. I tried the following:
I get no error message, but nothing shows up in the world. I also tried to run it without bAutoRegister = true and without RegisterComponent() since I think they are redundant, but it nothing changed.
The variable SphereMesh is set in the Constructor like so:
Can you give me a hint what I am doing wrong?
Thanks in advance
asked Oct 23 '14 at 02:30 PM in C++ Programming
I have some code that looks like this:
which seems to work great.
I have my own custom component which spawns a number of static mesh components and attaches to itself. I do this:
Which seems to be very close to what you are doing; out of curiosity, try recreating render state for them? RecreateRenderState_Concurrent etc.
answered Nov 25 '14 at 06:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here