- Home /
Post Processing Script doesn't work
So I downloaded Post Processing Stacks and Ii want to turn the screen black and white when the player dies. To test it I added a script in my main camera, and I also tested it in other places, didn't work. This is my code at Start()
PostProcessingBehaviour Filter;
Filter = Camera.main.GetComponent<PostProcessingBehaviour>();
PostProcessingProfile profile = Filter.profile;
ColorGradingModel.Settings s = profile.colorGrading.settings;
s.basic.saturation = 0;
There are no errors, and I added "using UnityEngine.PostProcessing;" at the start.
What am I doing wrong?
Answer by Torqus · Aug 31, 2017 at 08:01 AM
Well I fixed it. Thanks to AurimasBlazulionis in this answer Turns out I was never applying my changes, only making them, I was missing this line at the end of the script: profile.colorGrading.settings = s;
Your answer
Follow this Question
Related Questions
Post-processing overlay effects 0 Answers
How to change URP overrides by script? 0 Answers
Post processing is not visible on mobile apk build 1 Answer
How to properly use RTHandles in HDRP for post effects 0 Answers
Get Camera Current Post Profile Name 0 Answers