Referencing Instanced Foliage Actors

Okay i am not sure of the best way to explain this so bare with me.

I have been making a weather system for my game, and i have come to the stage of creating a snow system, now part of this is to have snow appear to settle on rock and tree meshes in the level. At the moment the way i plan to do this is by applying a dynamic material instance to the meshes at run time when called.

My problem is that i cannot find a way to reference the Instanced Foliage Actors. Some of the trees and rocks i have in my level were placed with a few procedural foliage spawners, and some with the foliage brush, so it is my understanding that some are existing as Procedural foliage volumes, and some as Instanced Foliage Actors, but i cannot find a way to to directly target them. Functions like “get All Actors Of A Class” will not return any of the meshes.

Is there a way for me to perform blueprint actions on the meshes placed by both the procedural spawner and the foliage brush, preferably without having to re-simulate and paint them again. It seems rather unreasonable that all my actors that i want to apply this material to would have to be hand placed.

Thanks in advanced this problem has been twisting my brain for days.

Yah its like some Foliage BP is missin. i need a node that i can use to trikker whne a foliage is destroyed something happens :S

I’m not entirely certain but what I think you’re looking for is the “foliageinstancedstaticmeshcomponent” blueprint. Create a new bp and select that as the parent class. There’s a whole bunch of functionality that you can access ( get/update instance transforms, remove instances,add instances, clear instances, etc) I don’t know if this will work with proceduraly placed foliage though, however, maybe you could use the add instances node instead of proceduraly placing the foliage?
I hope this is what you’re looking for :slight_smile:

Also Create dynamic material instances. Thanks Garf! :smiley: