11-04-2022, 08:53 AM
(11-04-2022, 07:59 AM)josemendez Wrote: You can't use Destroy() in editor. That's the reason why DestroyImmediate() is used instead, since the collision world might be destroyed in-editor when you switch simulation backends. Using Destroy() instead will cause all sorts of issues during edit mode, since multiple collision worlds will start to spawn in your scene.Appreciated! Imma stick with burst anyway, but yeah, I'll add the check just in case.
If you intend to remove all actors from a solver during an animation, you might want to call Destroy or DestroyImmediate depending on whether you're in editor or play mode. You can use Application.isPlaying to check for this.