I’m offering $5 to whoever can fix this problem (if they want it) more as a way to say thank you, I see this problem everywhere but I’ve yet to figure out how to fix it. I’m drawing a WebCamTexture onto a RawImage.
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class PhoneCamera : MonoBehaviour {
public WebCamTexture texture;
public RawImage image;
void Start() {
Toggle(true);
}
public void Toggle(bool show) {
gameObject.SetActive(show);
if(texture == null) Initialize();
if(show) texture.Play(); else texture.Stop();
}
private void Initialize() {
texture = new WebCamTexture();
image.texture = texture;
}
}
Ironically, this is a portrait mode picture:
As you can see it’s all stretched out, and sideways.