Posts

Showing posts with the label vfxgraph

vfx graph particles disappear when camera moves

 So my particles kept vanishing when I moved or rotated the camera. It turns out the bounds of my particles weren't being set - despite having set a "set position" AA box beneath. Make sure you set the bounds as well!! Plugging in the same AA Box should do the trick. Think of it like setting the Flip fluid domain in Houdini, only the fluid will vanish if you step out of it haha.

slider UI event/functions

Here's a way to get sliders to control VFX graph values   using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements. using UnityEngine.VFX; using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; public class slider_ctrl : MonoBehaviour {     public Slider _mainSlider;     public VisualEffect _visualEffect;     public Volume _volume;     [SerializeField]     private float _whateverValue = 0;     public void Start()     {         //Adds a listener to the main slider and invokes a method when the value changes.         _mainSlider.onValueChanged.AddListener(delegate { ValueChangeCheck(); });     }     // Invoked when the value of the slider changes.     public void ValueChangeCheck()     { ...