I am bouncing variables back & forth from unity web player to browser, in order to collect facebook user info without using facebook SDK (not very easy to use). I manage to pass rest of the stuff in, but I’m stuck on the screen capture.
var snap = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
snap.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
snap.Apply();
var screenshot = snap.EncodeToPNG();
Application.ExternalCall (“PostScore”, screenshot)
Can this be done? Cause my current code is not working.