Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    20
    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.  
     
unityunity