- Home /
Combine Children and Unity 4.0.1 not working the same as in previous version
Has anyone used the Combine Children script from the Standard Assets folder in Unity 4.0.1? It says that
"UnityEngine.Mesh.SetTriangleStrip(int[], int) is obsolete"
and that we should replace this with
Mesh.SetTriangles
.
So I replaced it 3 times in the script and I compiled and ran. No errors. Yet now the meshes don't appear in the game view. If I convert back to the obsolete version the meshes do appear in the game view. But then I get the warnings again. Plus there are a couple of extra unwanted triangle strips connecting geometry where it shouldn't. Before upgrading to this version of Unity I never had a problem with this script before. Anyone have any other issues with this script or any possible solutions? Thanks!
Is that only problem you faced?
Did you changed the anything in the script. Like Hashtable to Dictionary & ArrayList to List?
I was experimenting with this the other day after someone else posted a problem with changing the hashtable to a dictionary and the arraylist to a list. Either way, yeah, you get some warnings, but it works. It probably won't work forever, but you can silence the warnings by using a #pragma block if console warnings bug you.
Well actually it does not work 100%. There are about 12 different houses in a scene. The script creates 2 triangle strips connecting 2 of the different houses. The only way to remove that unwanted triangle strip is to remove those game objects from the parent holding all of them. Obviously the draw calls increase if I do this, but it may be the best solution since I don't have time to mess around with this script a lot. I appreciate the comments though.