Hello, I want to be able to change the values of the [kino post-processing effects][1] through code to act as a transition between two scenes in the HDRP but I get this error:
"Cannot use type 'Kino.AnalogGlitch' as parameter of type 'T' in type or generic method 'VolumeProfile.TryGet (out T)'. There is no default reference conversion from 'Kino.AnalogGlitch' to 'UnityEngine.Rendering.VolumeComponent'."
here's the code I'm using:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using Kino;
public class Main_Menu : MonoBehaviour
{
public Main_Menu S;
public AudioSource Music;
public float Time_Before_Scene_Change = 5f;
public Kino.PostProcessing.Glitch Glitch;
public AnalogGlitch analogGlitch;
public DigitalGlitch digitalGlitch;
public VolumeProfile volumeProfile;
private void Awake() {
S = this;
}
private void Start() {
volumeProfile.TryGet(out analogGlitch);
digitalGlitch = GetComponent();
analogGlitch = GetComponent();
}
public void PlayGame()
{
StartCoroutine (AudioFadeOut.FadeOut (Music, Time_Before_Scene_Change));
Invoke("LoadScene", Time_Before_Scene_Change);
}
public void QuitGame()
{
Application.Quit();
}
IEnumerator Wait(float waitTime)
{
yield return new WaitForSeconds(.1f);
Debug.Log("wait");
}
private void LoadScene()
{
SceneManager.LoadScene("Level1");
}
}
I know how to change post-processing in game but I can't figure out what the issue is here. Pls Im desperate.
[1]: https://github.com/keijiro/KinoGlitch
↧