How to get best resolution from phone camera WebCamTexture?

I’m writing a camera application in Unity with uGUI. I use the WebCamTexture with uGUI’s RawImage like so

WebCamTexture  webcam = new WebCamTexture();
webcam.Play();
rawImage.texture = webcam;
rawImage.SetNativeSize();

Now to get its data I used

public byte[] GetPNG()
{
    Texture2D tex = new Texture2D(webcam.width,webcam.height);
    tex.SetPixels(webcam.GetPixels());
    tex.Apply();
    return tex.EncodeToPNG();
}

But I noticed the resolution is very very low. Like 640x480. Even if I set request size on

WebCamTexture  webcam = new WebCamTexture(10000,10000,30);

I debugged webcam width and height and it is still like 1920x1080 while my Android phone is capable for taking more megapixels.
And not to mention it is VERY sluggish when I requested 10000 10000 (and got back only 1920x1080) maybe this is a bug? When I requested precisely 1920x1080 it is not laggy. (but still bad resolution)

This is camera app developed with Unity. Very low resolution.

alt text

This is the native android camera app. Notice that the preview image is much more sharper, which is reflected in quality of resulting file too.

alt text

Regarding this ridiculous problem caused by unity …

answer WebCamTexture, get correct resolution and RATIO. - Unity Answers