i have a 3D object , which i duplicate. Now the game runs with 30 fps . but when the duplicate object will be seen on screen, framerate drops for 1 second to 3 fps and then framerate is again 30 fps. Why?
what amount of polygons are we talking about here?
400 triangles has the object … and nothing else is in the scene
Instancing is a slow process and the speed depends on the amount of tri and component with it. Moreover, if this object have Rigid Body then FPS will drop and this one is the FPS killer.
You may do one tricks, like at the beginning of the game Instantiate the object that you may need then de-ativate it. When you will need just activate it and re-use it again.
I think this will help.
i thought Instancing will increase performance instead of making a new object
the iphone has no hardware instancing. you are defacto dublicating the object geometry etc
hmm… will it be better that i have only one big object in one level (for example 5000 Triangles) then 20 small objects ?
Definitely
The mesh combiners should help a lot there if you combine your levels at the start or alike.
ok and what about building one big object only in maya…is this also a good solution?
up to a given point.
You always should ensure that the object does not get too large because otherwise you will disable the effect of the view area and culling system as it will not split up your object to only show parts of it.
So depending on what you want to achieve, it might be simpler to do the combine within Unity