Have you checked the mounting points for both? It might be possible to swop out the mountings from an E46 six cylinder onto the E36 six cylinder to make it work. What about the electronics, are you thinking of getting an after market management system like a Spitronics or Go-Tech for the engine? Personally I suspect it will be easier to make an E46 sixer work in your car instead of the E36 sixer.
However, I have found that the mountings for six and four cylinders do not match, so my answer to your question is a careful no, but maybe other members will be able to help too, like Gizmo is very clued up on this kind of procedures. :thumbs: