soundvision/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SpectrogramVFXBind.cs

20 lines
451 B
C#
Raw Normal View History

2019-12-11 18:48:46 +00:00
using UnityEngine;
2020-03-04 20:47:24 +00:00
using UnityEngine.VFX;
2019-12-11 18:48:46 +00:00
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);
}
}
}