- Home /
texture2D wont render in webplayer
I have an app that is pulling from a webcam and receiving from one on another computer. It takes the frames and does facial detection on them and draws a rectangle around it. This simple app works perfectly on the desktop version of Unity but the 2 texture2D objects that are supposed to show the facial detection will not render, they only show white.
I am so lost and don't know what to even try at this point.
Any pointers would be great.
RENDER CODE
 OpenCVForUnity.Rect[] rects = faces.toArray();
                 foreach(var rect in rects)
                 {
                     Debug.Log("detect faces " + rect);
     
                     Core.rectangle(imgMat, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(255, 0, 0, 255), 2);
                 }
     
     
                 var texture = new Texture2D(imgMat.cols(), imgMat.rows(), TextureFormat.RGBA32, false);
     
                 Utils.matToTexture2D(imgMat, texture);
     
     
                 renderer.material.SetTexture("_MainTex", texture);
 
Your answer
 
 
             Follow this Question
Related Questions
Problems rendering background image in unity,Problems rendering background texture 0 Answers
ocupo una solocion a este problema en windows 8 con unity web player 0 Answers
Render a text on the sprite 1 Answer
Render texture fullscreen on top of camera output 0 Answers
Layered Billboard Sprite 0 Answers
