My question is a bit involved so I'm going to split it into parts and attach a picture.
1) In Unity I'd like to be able to draw a line on a 3D worldspace mesh with the mouse.
2) As I'm drawing on the 3D worldspace mesh, I need to have a 2D UI Image component that represents the same 3D worldspace mesh surface. The UI Image component needs to show the line drawing update in real-time on the UI.
3) I need to be able to also draw a line on the 2D UI Image component and have the line show up on the 3D worldspace mesh.
Currently, I have implemented part 1 by using raycasting and drawing my line on the world coordinates of the returned raycasthit. This works great.
Now, I'm a little at a loss as how to correctly map the world coordinates of the line to the 2D UI Image component's coordinates. I know if I can figure out how to complete step 2, step 3 would simply be reversing the process for step 2.
Here's a picture visualizing what I'm trying to achieve: