|
I'm importing a whole bunch of models that are collada. A lot of them share textures. I set the importer to look in the entire project to find materials. Nonetheless at run time it seems like all models are using instances of the materails rather then the materials themselves and that this is preventing batching. How can I get Unity to share materials across these imported models??
(comments are locked)
|
|
I'm not. They are existing data I am ripping and recoding. Im doing the collada trans-coding myself with a program I wrote. I can modify the collada pretty freely if that would help.
(comments are locked)
|
|
I ended up having to force the textures to be shared at runtime. As i instance each object I submit it to this class which forces like named materials to be shared. Now dynamic batching works.
(comments are locked)
|

I should add that there are hundreds of them. Individually setting them in the editor is otu of the question. I did try to make prefabs from them via a script-- and it crashed Unity which seemed unable to handle converting such a large number to prefabs.
Is it posible for you to convert those models to FBX files, because I have tried to use collada before and it just doesn't work well. So try that and let me know how it goes:)
FBXs show exactly the same symptoms
What program are you using to make all the models?