Hey everyone,
I’m trying to get a Color array containing the raw camera pixel colors. But the textures in the UnityARVideo script don’t have the right types . I can’t just take a screenshot and get the colors from that, because there’s an 3D object in front of the area where I wan’t to get the color from.
Here is my code:
Texture2D t = Camera.main.GetComponent<UnityEngine.XR.iOS.UnityARVideo> ().m_ClearMaterial.GetTexture ("_textureCbCr");
void GetElementColorFromCenter (Texture2D _t)
{
Texture2D t = _t;
Color[] colors = t.GetPixels ();
}