|
Hi, I'm starting with unity and Orthello. I'm instantiating 700 sprite prefabs in order to show them in the background. At the start of the level, the time that takes to instantiate the sprites is around 0.5 seconds (clocked by myself), but afterwards, there's a delay of 15~20 seconds where unity is doing something I don't know. I'm almost sure it's not stuck in a script of mine. How can I discover what unity is doing in that 15 seconds delay? thanks,
(comments are locked)
|

You could place some Debug.Log(); and see which one slows down. You could use Time.time to see what happens and when, but note that in the same frame all returns same time value. At least placing the print on the top of the functions you will see when printing slows down.
Thanks for your answer,
the problem is that it's not my code (I already logged it), so I don't know where to search.
I think orthello is the cause (I will log it)
Ideally you'd have Unity Pro, and could look in the profiler.
yep, it's orthello. It seems it's dying when he's using GameObject.Find in the "Start" function when there are lots of objects. I've removed the lines but it seems to be as slow as before, so it may not be the only cause.
I'll keep digging...
things are far from ideal right now ;)
Maybe in the next months if I can ship something decent to earn some $$$ (in fact I'm evaluating unity because of microsoft's XNA fiasco)