I made a dissolve shader in shader graph and wrote this script to make it dissolve over time.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Dust : MonoBehaviour
{
public ParticleSystemRenderer system;
public float dissolveSpeed;
private void Update()
{
system.material.SetFloat("_DissolveStrength", system.material.GetFloat("_DissolveStrength") + Time.deltaTime * dissolveSpeed);
}
}
This works for a particle system that only needs to appear once, but if I want something that continuously emits it doesn’t work because after it dissolves, all the other particles start out fully dissolved. Is there a workaround to this?