Log in or register to post comments

Streaming real-time webcam footage Onto a surface

July 30, 2018 - 2:47am #1

hello,

I'm trying to play real-time footage on a predetermined surface. First, I tried to add the VideoPlayer to an ImageTarget, but I couldn't get the webcam as input for the VideoPlayer. Bear in mind that I am not the most experienced in Unity. It seems to me that if I could import the webcam as an asset, I could use it in my VideoPlayer. Another option might be to implement WebcamTexture. This seems to do exactely what I want, but I haven't been able to implement it yet. The url I added in this post is a video of a woman that did mangage it. Unfortunally, she doesn't explain her methods and I am not sure how she got that Pivot into her hierarchy. Could somebody help me with this?UC Browser SHAREit MX Player

Streaming real-time webcam footage Onto a surface

July 30, 2018 - 8:46am #2

Unclear exactly what your goal is.  Are you trying to get the video feed texture from the devices camera?  If so, you'll want to do something like this:

BackgroundPlane = GameObject.Find("BackgroundPlane");

VideoBackgroundTexure = BackgroundPlane.GetComponent<MeshRenderer>().material.mainTexture;

Log in or register to post comments