soundvision/UnityProject/Assets/Scenes/Examples/Complex Demos/Scripts/VFXAudioTrigger.cs

18 lines
336 B
C#
Raw Normal View History

2020-01-07 18:48:04 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2020-03-04 20:47:24 +00:00
using UnityEngine.VFX;
2020-01-07 18:48:04 +00:00
public class VFXAudioTrigger : MonoBehaviour
{
[SerializeField] private VisualEffect vfx;
[SerializeField] private string eventName;
public void OnThresholdExceeded()
{
vfx.SendEvent(eventName);
}
}