- Home /
Increasing Prefabs lowers FPS (frame rate)
I have a fence that I would like to add to my scene and it is composed of a single prefab (with 192 triangles and 1 material). When I add the fence to my scene (~54 duplicates of the single prefab), my frame rate decreases significantly. The numbers are as follows:
No Fence Draw Calls: 1934, 60 FPS, Batched: 32
Add Fence (55 duplicates of PF) Draw Calls: 1940, 39 FPS, Batched: 3238
Add Fence with Combine Children script on Fence Prefab Draw Calls: 2074, 54 FPS, Batched: 80
I'm a complete noob and have just started using combine children on meshes in my scene which I will probably try and replace with static batching and possibly occulsion culling (which I understand might perform better). From what I understand, I shouldn't use Combine Children on a PF that is going to be dynamically batched. But why the huge frame rate hit when I add multiple instances of the prefab to my scene????
That's a lot of draw calls in the first place, isn't it? Do you have a lot of objects in your scene that are made up of several meshes, each with their own texture? For example is this fence dynamically generated to fit or is it always the same fence? If the latter, it should never have been imported as individual objects to begin with.
Yes it is alot of draw calls and there are still things that I need to do to optimize my models, which I am fully aware of. $$anonymous$$y concern is that prefab instances are greatly effecting the scene's frame rate.
$$anonymous$$ake sure you don't accidentally duplicated each mesh and/or each material with code like:
meshFilter.mesh
renderer.materials
Answer by IndieScapeGames · Aug 08, 2012 at 07:00 PM
I think it's just normal degradation based on more objects being displayed at once. If you add a lot of resources it will slowly drag down performance.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075400im_/https://answers.unity.com/themes/thub/images/avi.jpg)