Noob unity user here working on a coursework project. I’m making a 2D platformer and I am trying to add a UI that follows the player around. I have done that successfully as shown in the first image which i found from a youtube tutorial.
So after lots of fiddling around with almost every setting on the camera and the canvas, I finally found a solution. By going to 3D view, it becomes clear how far the camera renders. By fiddling around with the clipping view (i changed it from 0-10 to 0-1000), it takes into account how far away the UI level is from the actual scene (see the image for reference). It turns out if you push enough buttons, you can solve your own problems. Hope this helps out anyone else with problems with cameras and UI in 2D