How can I preserve both materials from two meshes that undergo boolean union? I want to Boolean union a cube (“A”) and a sphere (“B”) to created unified object (“U”). “U” should be a single mesh object with the faces of the new object inheriting the material properties of the corresponding faces from both "A" and "B" as explained in the documentation:



When I try to recreate this my unified object "U" ends up with either just the material from "A" or "B" but not both. I.e I want it to end up still yellow and red rather than totally red or totally yellow.





My process is simply create new mesh objects, assign separate materials, change the Diffuse property of each material, then go to add modifier > boolean > union > apply. Am I doing it wrong?
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.