So I am trying to at runtime add a handful of Instanced Mesh Components to an Actor.
This code runs without errors, but doesn’t add the components and I can’t figure out why.
Any help appreciated.
So I am trying to at runtime add a handful of Instanced Mesh Components to an Actor.
This code runs without errors, but doesn’t add the components and I can’t figure out why.
Any help appreciated.
Yes I’ve found this to be an issue as well. I believe its because instance static meshes require a existing static mesh. So if the static mesh isn’t in the level already it doesn’t exist. It may be better to have an actor that is out of visual range which just has variables stored with each static mesh and using them at run-time to set the static meshes.
Not ideal but static meshes are a bit of a pain when it comes to adding them at run-time. Additionally you may want to add a make transform node attached to the instance static mesh component as in your image it would currently not appear and give you a compile warning (not an error), if you have a blank transform node (with scale set to 1,1,1) it may work. It currently says spawn me at V:0,0,0-R:0,0,0-S:0,0,0 i.e S:0,0,0 is 0 pixels or 0 size so it doesn’t appear.
Hope that helps