Make an object fade out when triggered?

Hi! I used Brackey’s tutorial

on how to make a dissolve effect with shader graph and I’m trying to make it where when I shoot an object with a gun, I want it to trigger the shader and dissolve the object and eventually destroying it.

My problem is, this technique in the shader graph creates a constant loop, how do I make it to where it starts at 100% opacity, and then when triggered, dissolves and doesn’t come back? Or at least have it reset back to the beginning instead of fading back and forth.

Thanks!

Instead of using Sine Time just use custom exposed property for example “dissolve” (values 0-1) and then you can change it manually in material. If you want to animate it then you need script or animation to control the exposed property in the way you want.
The other way is to expose something like startTime and subtract it from current time, plus clamp it between 0 and 1 - this way you just set startTime (with Time.time) and it will animate once from that moment.