Hey guys…
I am trying to mix two different things, to see if they work, but I can’t realize on how to do that…
Here is the thing:
I have a plugin (U3DXT) to share a screenshot taken from an IOS device into Facebook or Twitter… now, that plugin shows a way to capture this screenshot:
var image = new Texture2D (Screen.width, Screen.height, TextureFormat.RGB24, false);
image.ReadPixels (new Rect (0, 0, Screen.width, Screen.height), 0, 0, false);
image.Apply ();
This way, however, takes the SS with no texts, so, it does not work for me, since I want to share the final score the user makes.
So, checking on Unity docs and some other answers, I found this way to take the screenshot and use it:
Application.CaptureScreenshot("screenShotToShare.png");
WWW www = new WWW(Application.persistentDataPath + "/screenShotToShare.png");
while (!www.isDone);
www.LoadImageIntoTexture((Texture2D)renderer.material.mainTexture);
Now, what I actually need is to “combine” that var image to be this mainTexture, since the code, to share the SS into Face would be:
SocialXT.Post (SLRequest.SLServiceTypeFacebook, "Can you beat my score?", image, true);
Is it clear?
Any help, please?