soundvision/UnityProject/Assets/Scenes/Examples/First Project/Scripts/VFXValueBinder.cs
2020-03-04 21:47:24 +01:00

16 lines
388 B
C#

using UnityEngine;
using UnityEngine.VFX;
namespace cylvester
{
public class VFXValueBinder : MonoBehaviour
{
[SerializeField] private VisualEffect targetVFX_ = null;
[SerializeField] private string valueName_ = "Value_1";
public void OnEnergyChanged(float value)
{
targetVFX_.SetFloat(valueName_, value * .1f);
}
}
}