Unable to switch Post-Process Layer to PostProcessing LayerMask

Hello all,

II got an issue on PostProcessing Effect :
When I try to change Post-Process Layer to the one I’m interesting to (8: Postprocessing) I always got the same result : Mixed…

Crazy thing is if I change this inside the editor everything works perfectly.

I’m using PostPorcessing-Stack V2.3…

See the code & the capture :

        PostProcessLayer postLayer = go.AddComponent<PostProcessLayer>();
        
        postLayer.volumeTrigger = go.transform;
        postLayer.volumeLayer.value = go.layer;
        postLayer.antialiasingMode = PostProcessLayer.Antialiasing.FastApproximateAntialiasing;

        postLayer.Init(PPResources);

155145-cap.png

the solution is to use LayerMask.GetMask:

PostProcessLayer postProcessLayer = gameObject.GetComponent();
postProcessLayer.volumeLayer.value = LayerMask.GetMask(“PostProcessing”);