Casting Geometry Cache to Static Mesh

Hey folks

I’m trying to create an Editor Utility Blueprint that will let me change material assignments to Geometry Cache. The idea behind this is to be able to quickly change material assignments across multiple variations of the same asset.

The logic behind this would be that I select the Material Instance that I want to swap and get the Material Index of the selected material from the Geometry Cache. Then taking that Index, I would swap out the material at the index slot with a new Material Instance.

I’m not able to find is how to get Material Index out of a Geometry Cache asset type.

Any help would be appreciated!!

have you found a solution to this?

I ended up not casting and just used arrays to get this done. It’s not the most optimized way but it works for me.

I saved the material slot names and material assignments from the Geometry Cache asset in two separate arrays. Then the selected materials name would query through all the elements of the array to find and replace with the new materials.

I kept the material slot names because if I wanted to reset the material assignments, it wouldn’t be a pain.

Hope this helps!