Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How do You Edit Post-Processing Through Script in The Latest Version of Unity?

Discussion in 'General Graphics' started by JMasterBoi, Jul 23, 2020.

  1. JMasterBoi

    JMasterBoi

    Joined:
    Jan 21, 2020
    Posts:
    6
    I know there are a lot of Questions already asked about this, but they all use unity 2018 or earlier and the code does not work anymore (header files don't exist, variable types either, etc.) and they don't even explain how it works.

    Could somebody please give a clear, up-to-date explanation on how to edit post-processing through script in the latest version of Unity? Thanks In advance! (**USING URP BTW**)

    (for anyone curious on what the **OLD** code was, this is the gist of it):

    Code (CSharp):
    1.  
    2.      using UnityEngine.Rendering.PostProcessing; // this doesn't exist anymore
    3.      using UnityEngine;
    4.  
    5.      public class VisualsManager : MonoBehaviour
    6.      {
    7.              public PostProcessVolume volume;
    8.  
    9.              private Bloom _Bloom;
    10.  
    11.              void Start()
    12.              {
    13.                      volume.profile.TryGetSettings(out _Bloom);
    14.  
    15.                      _Bloom.intensity.value = 0;
    16.              }
    17.      }