- Home /
How can I have the background for the main camera in a scene display the feed from a web cam/camera on a phone?
Hi all
I'm currently working an AR project aimed at data visualization in an AR environment. My end goal is to have a scene in which a 3D data visualization is rendered and the user can move around it freely as their perspective changes. At the same time, I want the main camera (the one meant to simulate the user's perspective) to always have the feed from a web camera or camera on a phone as its background. It seems that there have been some similar questions posted about this, but I can't find any solutions that seem relevant to Unity5. Any help would be appreciated. Thanks!
Answer by tanoshimi · Jun 30, 2016 at 05:07 PM
To my knowledge, you'd use exactly the same approach in Unity 5 as you did in previous versions of Unity: display the webcam feed on a WebCamTexture: https://docs.unity3d.com/ScriptReference/WebCamTexture.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612083911im_/https://answers.unity.com/themes/thub/images/avi.jpg)