As part of a plugin, I push some data onto a Texture2D (created at runtime as I cannot manually write to the render texture assets in android) and then I need to copy that to another texture (a render target asset, as I need it as an asset)
Update() I use
Graphics.blit(a,b); which works fine, but blocks the main thread thread as it syncs with the opengl thread (I believe there is a bit stall, flush, or something in non-multi-threaded rendering too)
Can I avoid this? Maybe I should do it with the Rendering command buffers? are they supported on android? AFAIK there are no render-thread callbacks in c# right?
I added a delegate callback which gets called from my plugin on the render thread, but unfortunately if I call Graphics.Blit there, it blocks acquiring the OpenGL thread (when it’s already on that thread) so my only solution I can see is to do the blit in my plugin when I say so.
Any alternatives (Just trying to keep the blit code inside unity)