Question by
Bettman · Jan 19, 2018 at 04:49 PM ·
applematerial colormaterial renderer
Accessing ARKit Camra colors
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 ();
}
Comment
Answer by BinaryBanana · Feb 16, 2018 at 08:12 AM
See https://forum.unity.com/threads/how-to-access-arframe-image-in-unity-arkit.496372/. Not possible today as it's a external texture
Your answer
![](https://koobas.hobune.stream/wayback/20220612150841im_/https://answers.unity.com/themes/thub/images/avi.jpg)