Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

(Problem) Turning postprocessing on and off

$
0
0
---------- **EDIT**: It seems that i just needed to replace "PostProcessing" with "PostProcessingBehaviour". It's working now ---------- Hello. I am trying to turn off post-processing when the QualityLevel is set to "Low" and lower, but i can't get the code right. Here is the code: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.PostProcessing; public class LowDetailToggle : MonoBehaviour { public int qualityLevel; // Get the PostProcessingBehaviour script public PostProcessing PPB; void Start () { qualityLevel = QualitySettings.GetQualityLevel(); Debug.Log(qualityLevel); PPB = GetComponent(); if (qualityLevel > 3) { PPB.enabled = false; } // If it's not, then do nothing } void Update () { } } But it always shows this error : error CS0246: The type or namespace name `PostProcessing' could not be found. Are you missing an assembly reference? Any way to fix this ? Let me know !

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>