Spawning Object Clean up: Expensive?
-
I've noticed some delays and lags that look to be timed with spawned object clean up.
I'm spawning lots of scoring graphics, and they only last a short time, then die, roughly all at around the same time, at which point there's several frames of stutter/lag and slight unresponsiveness to touch noticeable.
-
If they all die at once, you'll see the same toll as if they all spawned at once. Try killing one or two per frame.
-
@Thecheater887 I doubt that's true. I instance them all at exactly the same time... no stutter. No slowdowns, nothing. Not even a hiccup.
-
@Deeeds So maybe destroying objects is slower than spawning them. Either way @Thecheater887’s idea of just not killing them all at the exact same time should work. If you want them to look all destroyed at the same time, make them hide themselves all at the same time, then destroy themselves over a short time, probably one at a time.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login