void CameraCapture(Camera m_Camera, string filename)
{
RenderTexture rt = new RenderTexture(Screen.width, Screen.height, 16);
m_Camera.targetTexture = rt;
m_Camera.Render();
RenderTexture.active = rt;
Texture2D t = new Texture2D(Screen.width, Screen.height);
t.ReadPixels(new Rect(0, 0, t.width, t.height), 0, 0);
t.Apply();
string path = Application.streamingAssetsPath + "/" + filename;
System.IO.File.WriteAllBytes(path, t.EncodeToJPG());
m_Camera.targetTexture = null;
}



