Skip to content

Instantly share code, notes, and snippets.

@TomoG29
Last active January 13, 2019 04:50
Show Gist options
  • Save TomoG29/ec414c65d81b6f40c9594a30f47dc339 to your computer and use it in GitHub Desktop.
Save TomoG29/ec414c65d81b6f40c9594a30f47dc339 to your computer and use it in GitHub Desktop.
public IEnumerator ShareScreenShot()
{
string fileName = System.DateTime.Now.ToString("ScreenShot yyyy-MM-dd HH.mm.ss") + ".png";
string imagePath = Application.persistentDataPath + "/" + fileName;
ScreenCapture.CaptureScreenshot(fileName);
yield return new WaitForEndOfFrame();
string text = "ツイート内容\n#hashtag ";
string URL = "url";
yield return new WaitForSeconds(1);
SocialConnector.SocialConnector.Share(text, URL, PlatformFilePath());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment