« SIGBUS Errors | Main | Unity iPhone Axis »
Monday
Nov232009

Micropausing when destroying enemies

There is a micropause when destroying skeleton warriors. I am betting this is due to all the Instantiates and GetComponents that are floating around at that point. There are also Resource.Load calls in there as well.

Solution is to preinstantiate everything. Store a set number of debris pieces in a manager along with references to all textures.

Well, first I need to figure out how to make a game with multiple enemies first eh?

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>