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. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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.