|
|
|
| View previous topic :: View next topic |
AustinJ
Joined: 10 Apr 2009 Posts: 4
|
Posted: Thu Nov 05, 2009 4:33 pm Post subject: |
|
|
|
Quick question about prefabs...
If i have a model of a box(one mesh) that needs to be duplicated about 600 times in unity, will I have better performance if I create a box prefab, then duplicate it? Or is it more or less the same as if I just import the model and duplicate it?
thanks |
|
| Back to top |
|
|
oxl

Joined: 21 Nov 2008 Posts: 134
|
Posted: Sat Nov 07, 2009 2:19 am Post subject: |
|
|
|
I would like to know this , too.
Maybe this is not the perfect sub-forum to ask this question.
-
oxl |
|
| Back to top |
|
|
dreamora
Joined: 05 Apr 2008 Posts: 6663 Location: Zürich, Switzerland
|
Posted: Sat Nov 07, 2009 9:04 am Post subject: |
|
|
|
it will in both cases be pretty heavy if they are on screen as its 600 distinct objects in both cases.
The main difference is that with your own you can layout the UVs on the cube as you need them while you have to use the one provided if you use the unity one (unsure if unity's cube has per side UVs or not) _________________ Technologies: Unity Pro, iPhone Advanced
Site: GayaSoft & PatchLaunch Technology
My Blogs:My Development & Persistent Online Worlds |
|
| Back to top |
|
|
Tzan
Joined: 05 Apr 2009 Posts: 26 Location: Boston, MA
|
Posted: Sat Nov 07, 2009 6:45 pm Post subject: |
|
|
|
600 objects will use 600 draw calls per light, assuming you used just 1 material per box.
If you are not moving these boxes around individually during play, you can use the Combine Children (CC) script to make 1 mesh out of them. Then its just 1 draw call.
number of different materials x lights = draw calls on a CombineChildren mesh
I think thats right.
If you need to move some you can get creative and group them, then remove CC do changes set CC back on. |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|
|