Closed eetteri closed 1 year ago
Hi, Did you find the solution for this?
Actually yes. I was able to copy the texture onto another one on update loop by using
Graphics.CopyTexture(srcTexture, dstTexture)
where the dstTexture is initialized and set to RawImage at start. However I have another problem where I need to get raw bytes of the copied texture into a buffer with
NativeArray<byte> nativeByteArray = dstTexture.GetRawTextureData<byte>();
but that ends up with a buffer where all the values are 205. However this is a problem/bug/feature on Unity side and I'm exploring that still.
Thank you :) It worked
First thanks for this great asset for UnityAndroid projects, really great.
I'm experiencing strange problem which I quite can't pin point. I have RawImage on my UI and my UVC device draws into it without problems. I am using the UVCDrawer prefab.
I need to also pass the video for some other processing and I'm trying to copy the texture data from RawImage into another one on update loop. Basicly like this
For some reason I have not been able to copy the texture and I always end up light gray filled texture. If I swap eg. WebCamTexture as a source for RawImage, the texture copying above works fine.
So is this some quirk connected to Unity that I'm not grasping now or could this be related to UVC4UnityAndroid?