Я пытаюсь изменить цвет цветения (PostProcessing) через скрипт. В инспекторе цвет меняется, но не в игровом представлении. Некоторая помощь, пожалуйста.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
public class PostProcceserManager : MonoBehaviour
{
PostProcessVolume volume;
Bloom bloomLayer;
public ColorParameter [] ColorArray;
private void Awake()
{
volume = gameObject.GetComponent<PostProcessVolume>();
volume.profile.TryGetSettings(out bloomLayer);
}
private void Start()
{
//change the color
volume.enabled = true;
ColorParameter x = new ColorParameter();
x.value = Color.red;
x.overrideState = true;
bloomLayer.color = x;
}
}