soundvision/UnityProject/Assets/Scenes/Examples/First Project/Scripts/VFXValueBinder.cs
2020-01-13 16:20:47 +01:00

16 lines
401 B
C#

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);
}
}
}