Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. How can we improve our URP documentation to cover your needs? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Question Need some help with my particles.

Discussion in 'Visual Effect Graph' started by Penguwastaken, May 10, 2022.

  1. Penguwastaken

    Penguwastaken

    Joined:
    May 1, 2022
    Posts:
    17
    Hello,

    Im new at Unity and I would like to make that everytime the player press "Shift" it appears some particles, but I dont wan´t the particles to loop.
    How can I do that?


    Thanks for your time.
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    527
    Sorry for not answering question directly, but if you are new to Unity you should start with breaking problem into smaller pieces. For example start with Debug.Log() when player press some key, then create VFX that does one burst on awake and then combine both.

    If you need to check player key press (default input system) you can use Input.GetKeyDown. If you need single burst of particles, then create graph with
    Single Burst
    block in spawn context and next call SendEvent to visual effect to activate it. Also in default setup you can just call Play() - it will send "OnPlay" to the graph.
     
  3. Penguwastaken

    Penguwastaken

    Joined:
    May 1, 2022
    Posts:
    17
    Thanks,I just needed help with the VFX, cause I didnt know how to use it.
    Thanks for your help.It works now.
     
unityunity