Cullingmask is not used by the camera

Hi guys,
via culling masks I try to hide or display objects dynamically. Therefore I assign a new layer to the objects at runtime and change the culling masks of the camera.

All this works perfectly, but the camera ignores the change of the culling masks or the layers, I’m not so sure about that. The camera shows objects that should be hidden and vice versa.

Is there a workaround for this or is others also aware of this problem?


The moment i posted this… I forgot to change the childrens layers as well… How do I delete a thread? xD