I want to grab pixels from a webcam texture just as they arrive, but the pixels I receive using GetPixels32 (when didUpdateThisFrame is true) seem to be one frame behind when I compare to the original texture (displayed by GUI.DrawTexture). I’ve tried to grab the pixels on Update and LateUpdate.
When exactly is the texture updated?
UPDATE#1: When using OnPreCull, OnPreRender or OnPostRender then pixels and texture seem to be in sync. I still get some random time offsets, perhaps because I’m only grabbing pixels when didUpdateThisFrame is true =/
UPDATE#2: Using WatForEndOfFrame in a coroutine does not seem to fix the issue either.