soundvision/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SpectrogramVFXBind.cs
2019-12-11 19:48:46 +01:00

19 lines
464 B
C#

using UnityEngine;
using UnityEngine.Experimental.VFX;
namespace cylvester
{
public class SpectrogramVFXBind : MonoBehaviour
{
[SerializeField] private Spectrogram spectrogram;
[SerializeField] private VisualEffect visualEffect;
public void Update()
{
visualEffect.SetTexture("Spectrogram", spectrogram.Texture);
visualEffect.SetInt("Spectrogram_Index", spectrogram.Index);
}
}
}