Cast Hidden Shadow on dynamic loaded StaticMesh

Hi

I have build a room entirly with a blueprint out of staticMesh elements.
If i press a button the Roof will be invisible. But the lighting inside the room should stay. So i want to set castHiddenShadows to true but the blueprint only let me read this value. Is there a way to set this value at runtime?

I have a couple of ideas but I need more info first. Is the room blueprint spawned at runtime or is it in editor and built with construction script? Does the roof exist as a blueprint component or is it spawned at runtime? Is it spawned as a separate actor or added as a new component?

The Room is Build at runtime, At the moment the Roof elements are staticMeshs and are added as new components to the room blueprint. I collect them inside of an array and set the visibility to true/false with a for each loop.

When you add a static mesh component, it lets you set some settings in the details panel.

If you set that at spawn, then there is no need to change the setting in game. Does that work for you?

It was exactly wat i was looking for, thank you. :slight_smile: