Last active
October 29, 2020 09:00
-
-
Save rgarlik/aa037c720e5c42586b0cfb02ab36aa8a to your computer and use it in GitHub Desktop.
PostProcessChange.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
using UnityEngine.UI; | |
public class PostProcessChange : MonoBehaviour | |
{ | |
public Slider TemperatureSlider; | |
// Set to update every time the slider is updated | |
public void SetColorAccent() | |
{ | |
WhiteBalance wb; | |
if(PPVolume.profile.TryGet(out wb)) | |
{ | |
wb.temperature.value = TemperatureSlider.value * 200 - 100; | |
} | |
// This works for any property of any post-processing effect | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment