04-04-2023, 06:19 PM
"NewParticle()" is not thread safe (this is stated in the new Script API window, but now in the old Script API listed below the main script, so I understand why it would not seem to be a problem at first)...so it's crashing due to a race condition.
You could either run the script single-threaded, or track when you want to spawn a particle in a thread-safe manner and then create them in 'postSimulationStep'.
You could either run the script single-threaded, or track when you want to spawn a particle in a thread-safe manner and then create them in 'postSimulationStep'.