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

14 lines
329 B
C#
Raw Normal View History

2019-10-03 09:43:11 +00:00
using UnityEngine;
using UnityEngine.Experimental.VFX;
public class FlareBind : MonoBehaviour
{
[SerializeField] private VisualEffect flareEffect;
private static readonly string Spread = "spread";
public void OnEnergyChanged(float energy)
{
flareEffect.SetFloat(Spread, energy * 0.01f );
}
}