can't make Combine Children work, please help

i read couple of threads and watched the video in resources section, I know the combine children should work, as long as nearby objects are grouped into one object using combine children script. Here’s the screenshot first, please help me,

Click to see the screenshot, http://www.qplot.com/wordpress/wp-content/uploads/2009/06/unity_question_combinechildren.png

essentially I have tons of cylinders on the screen, each of them have the same texture mapping. and I have two lights there, both are directional. Three cases I tested so far

  1. Run without any combine children;
  2. Put everything into one object with combine children;
  3. Put each segment into one object with combine children (shown in the screenshot), i selected 8 of them, each of them have around 10 cylinders.

so the thing I got confused is that all the above three runs gave me approximate same result, Draw call, 2065, Tris:1.1M, Verts:635K. I must be doing something wrong.

Fang

ok, there’s another bit of info.

seems the combine children didn’t do it right, if I take a look at each compiled mesh, the mesh isn’t combined, it creates a singled combined mesh for each cylinders :slight_smile:

what i did is this, I create an container object first, then add all children to it and then add a “CombineChildren” script to it. In code it’s like this,

				GameObject bc = (GameObject)Instantiate(branchCombine);
		                obj.transform.parent = bc.transform; // for couple of times
				bc.AddComponent("CombineChildren");

each obj got a material.

Is this correct ?

thanks.