Viewport Texture Data (Update)
I'm creating an editor plugin and I need a way to snapshot the texture data coming from a viewport in a loop.
I need to do a lot of snapshots so I want to reuse the same viewport. In my tree I have a viewport and a camera as a child and in my tool in the loop for each iteration: I'm simply moving the camera and doing a GetTexture().Data on the viewport and finally saving the image as a png.
My issue is that all my saved images correspond to the same camera point of view. It's like if the viewport was not updating the render at each loop iteration.
Is there a way (like Camera.render in unity) to force the update of the render in the viewport ? If not what could I do ?
Thanks in advance !