I have done searching online, and have only found out how to change float values. How do I change other aspects, such as rounded, and color?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
public class PostProcessing : MonoBehaviour
{
public PostProcessVolume volume;
private Vignette border;
public float sniperZoom = 0.7f;
public float sniperZoomTime = 0.5f;
public float dead;
private Health health;
private ScrollWheel scroll;
void Start()
{
volume.profile.TryGetSettings(out border);
border.intensity.value = 0;
health = GameObject.FindObjectOfType<Health>();
scroll = GameObject.FindObjectOfType<ScrollWheel>();
}
void Update()
{
if (Input.GetMouseButton(1) && scroll.weaponSelect == 3 && !health.playerDead)
{
border.intensity.value = Mathf.Lerp(0, sniperZoom, sniperZoomTime);
}
else if ((!Input.GetMouseButton(1) || scroll.weaponSelect != 3) && !health.playerDead)
{
border.intensity.value = Mathf.Lerp(sniperZoom, 0, sniperZoomTime);
}
if (health.playerDead)
{
border.intensity.value = Mathf.Lerp(0, dead, 0.5f);
border.smoothness.value = 1;
border.rounded = false; //how do I set this to not rounded
}
}
}