According to this doc, the new Remote 4 now supports streaming back the device cam to the editor, afaik this was newly added with Unity 4.5: http://docs.unity3d.com/Manual/UnityRemote4.html
Just tried the script below with the latest Unity 4.5.0f6 and the Remote 4 from the Play Store on Android (HTC One), but it does not work as expected. I was under the impression that creating and rendering a WebCamTexture using the remote would automatically stream back the device camera (see script code below - just attached to the main camera in the scene), but it does not. Instead, I get the view from the web cam connected to my PC streamed onto my device. If I unplug the webcam, I don’t get the device cam either, just an error log “No available webcams are found. …”.
Is there something I’m doing wrong or is device camera streaming not actually supported yet?
Cheers,
Johannes
using UnityEngine;
public class WebCamBehaviour : MonoBehaviour
{
WebCamTexture mWebCamTexture;
void Start()
{
mWebCamTexture = new WebCamTexture();
mWebCamTexture.Play();
}
void OnGUI()
{
GUI.DrawTexture(new Rect(10f, 10f, (float)mWebCamTexture.width, (float)mWebCamTexture.height), mWebCamTexture);
}
}