- Home /
Problem is not reproducible or outdated
Low frame rate with small amount of verts
I have a lot of clones of a sprite prefab (GameObject with animation)in my 2d game.
The fps thus is very small. At the same time I have only 15 draw calls in my scene.
I think the only solution is to decrease number of verts. Am I right?
How can I decrease number of vertices for my prefab?
A sprite generally only has 4 vertices. There's no less vertices you can have. You should find out which part of your game is causing the bottleneck. It might be the sheer number of objects, a script you have on all your objects, or simply just the fill-rate of your graphics card.
added to what @$$anonymous$$roductions1 said, check the memory usage, physics components, number of textures used (comes in memmory as well)
@flamy It can be "cheap" depending on how it's implemented, but I agree, this is probably the cause of the low framerate.
With spacial structures, it can be a O(1)
calculation, with optimized looping it can be O(N!)
but it's most likely O(N^N)
right now.
You might check out using a quadtree or k-d tree. Here are some links:
http://unitycoder.com/blog/2013/03/26/kdtree-find-nearest-object/
@jonSG Please post that on the question that asks how to optimize finding the closest object, not the question that asks how to optimize rendering of sprites. There's a reason this question is closed ;)
Follow this Question
Related Questions
how can i draw many (1000+) sprites 1 Answer
Lower Draw Calls For Sprites 2 Answers
different atlas groups makes more draw calls ? 0 Answers
Draw calls versus triangle count, optimization issue 1 Answer
Is it possible to utilize iphone dynamic batching with "traditional" animated sprite techniques? 1 Answer