While this will certainly not deal with different rotations or orientations automatically the closest thing I can think of without resorting to coding would be the following, assuming each window, door, or other feature is a separate entity from the rest of the house mesh (with no shared vertex or faces)
- Enter edit mode on your mesh
- Select a single face or edge from one of soon-to-be independent objects, like say one of your windows, that as a very distinct feature, like a particularly unique face area, a unique number of concurrent edges, a particular length, or a specific number of surrounding faces, specific to that type of window
- This will allow you to use Shift + G to select similar and choose the particular feature that is unique among all windows
- Adjust the threshold to a value low enough that will only select edges exclusively from sub-objects of the same type (windows in this example)
- Now press Ctrl + L to select all linked so that Blender selects the whole windows
- Now you have all windows selected and you can separate them from the main mesh using P > Selection
- Exit edit mode and enter edit mode on your newly created all-windows mesh. If all windows are comprised of a single linked set of faces you can now use P again to separate all windows into their own object with the option By loose parts
- Every window should now be an independent object, although still not sharing objectdata, so now exit edit mode, with all windows selected and press Shift + Ctrl + Alt + C and choose Origin to geometry
- Still with all windows selected (make sure one of them is the active object) now press Ctrl + L Make Links > Object Data
- Your windows should now be all correctly placed and sharing object data, although rotations will still be messed up
If these are regular orthogonal buildings manually rotating them back into place should not be too laborious, as they will likely fall into either 90 -90 or 180 rotations but will still require some manual labor.
If someone smarter than me can come up with a way to solve this last part without manual work I would love to hear it.
For whole buildings, if they are all equal or share a few different designs that repeat you could separately build a few groups comprised of several repeating parts (windows, doors, etc) and use group instances to replace whole buildings making a more modular approach, though I can think of no technique to correctly place them in the scene.
unit_test_compare()
is really slooowww. Another idea would be building a custom 'library Add-on' in order to instantly work with linked duplicates. Unfortunately I have no idea about unity. Just out of interest: How linked duplicates can help to reduce the polycount? $\endgroup$