This is fairly easy. Create a SceneCapture2D in front of your weapon at desired FOV, render the object to a RenderTexture2D, then render this texture with a Canvas DrawMaterial call using a material that masks the background color.
I recommend making the changes suggested above in the linked thread. If you want to be lazy though, you can move your weapon and camera to a far out location such as high in the sky where nothing else will be rendered in the view due to culling.
I have been struggling with a gamma/tonemapping issue when using DrawMaterial (emissive/unlit) instead of DrawTexture though. For some reason it renders the rendertarget much darker. I tried to do an inverse pow 2.2 thinking it just needed to be converted to linear space, but it was still slightly wrong. I toggled force linear gamma and no difference. I don’t know what is fundamentally different between DrawTexture that can’t be replicated with DrawMaterial.