Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[VFX Graph] Events not activating when called rapidly

Discussion in 'Graphics Experimental Previews' started by turboturboturbo, Nov 24, 2019.

  1. turboturboturbo

    turboturboturbo

    Joined:
    Dec 2, 2018
    Posts:
    25
    When I rapidly send events to the VFX graph, some of them do not activate.
    Is this a bug, or am I missing something?

    Here is an example of what I'm doing:


    Code (CSharp):
    1.  
    2.  
    3. // Call events  in quick succession
    4. foreach(Vector3 position in list) {
    5.      Activate(position);
    6. }
    7.  
    8. public void Activate(float position)
    9.     {
    10.         VFXEventAttribute _attrib = vfxPrefab.CreateVFXEventAttribute();
    11.         _attrib.SetVector3("position", position);
    12.         vfxPrefab.SendEvent("OnManualSpawn", _attrib);
    13.     }
    14.  
    15. // Some of these events do not activate!!!!!
    16.  
    17.