soundvision/UnityProject/Assets/Scenes/Examples/First Project/Scripts/VFXValueBinder.cs

17 lines
401 B
C#
Raw Normal View History

2020-01-13 15:20:47 +00:00
using UnityEngine;
using UnityEngine.Experimental.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);
}
}
}