I have a set of blueprints which contain a few “InstancedStaticMeshComponent” components. In the details tab of said component, I then create the instances I need.
My question now is: how can I access the instances individually in the construction script of the BP (I need to assign separate materials to each mesh instance)?
As I understand it, you have no way to target an instance after it was instantiated. It ‘melts’ together with the other instances. Also, all instances always have the same properties as the source part. I experimented with instances and found it especially frustrating that all instances change their LOD in respect to the common center of all instantiated parts. Also culling, once triggered, hides all instances at once, no matter how far they are away.
Basically you spawn collision volume actors with your instances that handle collision events and everything that comes with that. I use it and it works quite well. It at least keeps me down to a few dozen draw calls instead of tens of thousands.
@Zeustiak: Thanks for the hint. I’ll have a look at it (I remember following that thread ;). I don’t have as many instances, I’m at 6-12 per BP and around 150 per level. Let me give your approach a shot, though.