Render UI3D in Canvas

UIMeshrenderer not working when I changed the material of model UI3D in script. My UI3D was then pushed back to the 2D layer.