I’m currently working with a friend on a 3D breakout-style game, and we’re reaching the stage now where the majority of code, artwork and planning is finished, so we can move on to level creation.
The problem is, many of the brick layouts are created in 3DS Max, then exported into unity as an fbx. This causes every brick in that fbx file to save as a separate prefab, each with a separate mesh (despite all having the exact same mesh, just positioned differently in the scene).
Is there any way to configure 3DS Max (or another similar 3D software) to recognise that the block is the same object cloned, so that importing it into unity will save it as 1 prefab with 1 mesh?
I haven’t tried this myself, but I have been told that Unity recognizes Max Instancing on import, so as long as all those blocks in your original files are instances of one another, it should see them as the same.
Hmm… though if I think about it, it would still bring them in as multiple files. So unless your experience proves otherwise, scratch that idea.
Your best bet is to import one brick, and then assemble your stages in Unity using the snap feature. It will go just as quickly as if you did it in your 3d application, and if I’m picturing the right kind of breakout-clone, this should be pretty fast all around.
Unfortunately we’ve made some quite nifty scenes in 3DS which are difficult to replicate at speed, even with the snap tool, because of the features only available in 3DS, i.e. like the double helix layout shown in this (very early!) screenshot:
But then, if its worth doing, might as well take my time doing it!
What I would suggest is to write a script that reads the positions/rotations from the max file (from max script, or parsing fbx/obj) and do an editor.instantiate to place the objects in your scene as prefabs. Or, if they aren’t dynamic, attach them as one object.