WebCamTexture Data for analysis

Hello. Ask for help. I track a point of light using a web camera and position the 3d object in the appropriate coordinates. The image from the camera is located on the background on Canvas.

The problem is that Unity first gets the image from the camera and outputs it to the background. And only in the next frame can I make calculations and place a 3d object. It turns out that the calculation of the coordinate is always one frame behind the image on the camera.

Question. How can I get a picture from the camera in one frame and place a 3D object in the desired coordinates?

This is the Unity timing diagram:

But it doesn’t explicitly say when the webcam is read.

One possibility is to move your processing to LateUpdate() but that might not help.

Another possibility is to keep 2 textures and switch between them and only show the previous frame, which should sync up with where you have moved the 3D object because both will be one frame late.