Hello,
Sorry for the late answer, we missed the initial message.
The block SpawnOverDistance relies on VFXSpawnerCallbacks interface, within the VisualEffectGraph package, there are a few blocks implemented this way :
- LoopAndDelay (which is now a behavior directly configurable on the spawn context)
- SetSpawnTime
- IncrementStripIndexOnStart
- SpawnOverDistance
For performance, when possible, we recommend avoiding usage of these spawn blocks for two reasons:
- This unexpected garbage (which is actually an issue, you can track the resolution here)
- These blocks are forcing the VisualEffect component update to be processed on the main thread (with current implementation of VFXSpawnerCallbacks)
However, the behavior of spawn over distance can generally be emulated using graph:
We are aware this VFX looks like a convoluted workaround but, even if the unexpected garbage is solved, the resolution of the performance issue with SpawnOverDistance will probably internally produce the same kind of graph.
8442167–1119026–SpawnOverDistance.unitypackage (12.6 KB)