- Home /
object pooling on mobile
hi im using object pooling for a mobile space shooter and everything works fine. but when i start shooting those deactive objects and activate them, it stutters on my mobile device. i noticed this in earlier projects and i worked around it by just deactivate the graphics and not the collider but maybe some of you know a better way to not leaving the collider in scene. im certain its about the garbage collector which clears the deactive colliders.
I'm assu$$anonymous$$g your project is 2D. How much such objects do you have in your scene and What type of collider are you using in it. Are the objects in your scene obey physics? I.e do they have rigidbody component attached to them?
Answer by sweeperu · Dec 18, 2016 at 11:23 AM
Yes my game is 2D i have like 70 objects pooled, which can extend if needed but i dont use any physics in my game, i used rigidbody for enemys and box collider on those as for bulletfire sprites, all set up as trigger.
Since i dont use any physics i wrote my own little collision detection and removed any collider and rigidbodys which works fine for me now.
Your answer
Follow this Question
Related Questions
Is Draw Call the main factor to consider for mobile optimizations? 1 Answer
Scroll Rect draging delay 0 Answers
Mobile Game starts lagging after a while when playing on my phone!!!! Pls Help!!! 1 Answer
mobile design for sprite heavy game? 0 Answers
Is it possible to switch off forced strong typing for ios/android? 2 Answers