<Solved> Spawned Prefabs = No Shadows

Hey there.

When I spawn prefabs I get no shadows.
ShadowCastingMode is set to ON.

When I query the spawned prefabs via:

console.log("SHADOW CASTING MODE:" + block.getComponent(MeshRenderer)?.shadowCastingMode + "\n");

…the result is 0. So somehow the Prefabs get spawned with ShadowCastingMode OFF.

As I am very new here, I am not sure if/where I did something wrong or if this
is just not possible (yet?) in CC3 preview. All I can say is that everything is turned ON
in the editor (original instance, prefabs, etc…)

(I also tried to change the property on the MeshRenderer component to ON via code
right after the spawn method, but I don’t know how to do it. I don’t know how to SET the property)

Any input appreciated.

Thanks,
tL.

EDIT: This was easily solved. ShadowCasting Mode needs to be on before creating
a Prefab. Looks like that this can’t be changed after the fact.