How can I preserve both materials from two meshes that undergo boolean union?
I've posted this question elsewhere and got this answer "The object with the boolean modifier needs to have both materials in its material list"

I tried exactly that, first when I make my two objects with separate materials, I make sure the second mesh also lists the material of the other object, even though it is not in use:



then when I request that second mesh to be boolean unified to the other mesh, the result is multicolor:



That object in the screenshot is definitely a single mesh with two materials. So that seems the way to do it.