Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to reuse a graph but with multiple spawn types? (constant, single burst, etc)

Discussion in 'Visual Effect Graph' started by Saucyminator, Jul 16, 2021.

  1. Saucyminator

    Saucyminator

    Joined:
    Nov 23, 2015
    Posts:
    61
    I've created a simple smoke graph I'm looking to use in multiple ways. Sometimes I need to to act like smoke, so constant stream of particles are needed. Other times I need to use a single burst of smoke.

    How do I setup this?

    I've tried setup a subgraph but the subgraph NEEDS a spawn node. When I do add a spawn node in the subgraph the editor goes haywire, trying to collect dependencies over and over again, endlessly.
    And if I don't have a spawn node in subgraph, I can't connect my master graph spawn node to it.
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,294
    This part sounds like bug, but I would like to know too if this is possible. If spawn block is absent, there are no inputs for events.

    My workaround would be different events for constant and burst, so I can use proper event in parent graph.
    eve.png
     
  3. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    I've seen this happen when you have a disabled block in one of the contexts & it has an input wired to it. For example, in Update Particle, having a Set Velocity which is disabled, but still has another input wired into Velocity.

    When it happens you have to spam click the checkbox until the UI catches it and re-enables the check (otherwise the editor is stuck in the collect dependency loop)