示例#1
0
    private IEnumerator TakeScreenshot()
    {
        yield return(new WaitForEndOfFrame());

        Texture2D snap = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);

        //screenShotTexture.mainTexture = snap;

        snap.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
        //chụp màn hình lưu thành texture2D
        snap.Apply();
        UM_ShareUtility.FacebookShare("Pikachu", snap);
    }
示例#2
0
    public void Share(string providerName)
    {
        var message = E7.Localization.GetString("share_message") + messageInputField.text;

        switch (providerName)
        {
        default:
        case "Facebook":
            UM_ShareUtility.FacebookShare(message, texture);
            break;

        case "Twitter":
            UM_ShareUtility.TwitterShare(message, texture);
            break;
        }
    }
示例#3
0
    private IEnumerator PostScreenshot()
    {
        yield return(new WaitForEndOfFrame());

        // Create a texture the size of the screen, RGB24 format
        int       width  = Screen.width;
        int       height = Screen.height;
        Texture2D tex    = new Texture2D(width, height, TextureFormat.RGB24, false);

        // Read screen contents into the texture
        tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
        tex.Apply();

        UM_ShareUtility.ShareMedia("Title", "Some text to share", tex);

        Destroy(tex);
    }
示例#4
0
    // PostScreenshot
    private IEnumerator PostScreenshot()
    {
        yield return(new WaitForEndOfFrame());

        string title = "";
        string desc  = "";

        switch (Language.CurrentLanguage())
        {
        case LanguageCode.KO:
            title = "벚꽃엔딩";
            desc  = "❀✺따뜻한 봄을 간직한 벚꽃이 피었어요.❀✺";
            break;

        case LanguageCode.JA:
            title = "さくらドロップス";
            desc  = "❀✺暖かい春を秘め桜が血だった.❀✺";
            break;

        default:
            title = "Sakura Drops";
            desc  = "❀✺ was bearing the warm spring blooming cherry .❀✺";
            break;
        }

        // Create a texture the size of the screen, RGB24 format
        int       width  = Screen.width;
        int       height = Screen.height;
        Texture2D tex    = new Texture2D(width, height, TextureFormat.RGB24, false);

        // Read screen contents into the texture
        tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
        tex.Apply();

        UM_ShareUtility.ShareMedia(title, desc, tex);

        Destroy(tex);
    }
示例#5
0
 public void OnTwShare()
 {
     OnShareClose();
     UM_ShareUtility.TwitterShare(url, textureForPost);
 }
示例#6
0
 public override void OnEnter()
 {
     UM_ShareUtility.TwitterShare(status.Value, texture.Value as Texture2D);
     Finish();
 }
示例#7
0
 public void OnContact()
 {
     UM_ShareUtility.SendMail("Fast Fours Support", "Hello Fast Fours Support. <br><br> Please tell us what type of device you have? and how we can help you.", "*****@*****.**");
 }
示例#8
0
 public void OnFBShare()
 {
     OnShareClose();
     UM_ShareUtility.FacebookShare(url, textureForPost);
 }
    // facebook sharing
    public void postTextureFB()
    {
        UM_ShareUtility.FacebookShare("@thebridebox " + "#thebridebox", screenCap);
//		analyticsControl.screenshotShare("facebook");
    }
    // twitter sharing
    public void postTextureTwitter()
    {
        UM_ShareUtility.TwitterShare("@thebridebox " + "#thebridebox", screenCap);
//		analyticsControl.screenshotShare("twitter");
    }
示例#11
0
    void OnGUI()
    {
        float StartY = 20;
        float StartX = 10;

        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Twitter", style);

        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post"))
        {
            UM_ShareUtility.TwitterShare("Titter posting test");
        }

        StartX += 170;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post Screehshot"))
        {
            StartCoroutine(PostTwitterScreenshot());
        }


        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Facebook", style);


        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post"))
        {
            UM_ShareUtility.FacebookShare("Facebook posting test");
        }

        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post Screehshot"))
        {
            StartCoroutine(PostFBScreenshot());
        }


        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Post Image"))
        {
            UM_ShareUtility.FacebookShare("Hello world", textureForPost);
        }



        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Mail", style);


        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Send Mail"))
        {
            UM_ShareUtility.SendMail("My E-mail Subject", "This is my text to share", "[email protected], [email protected]");
        }

        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Send Mail with image"))
        {
            UM_ShareUtility.SendMail("My E-mail Subject", "This is my text to share <br> <strong> html text </strong>", "[email protected], [email protected]", textureForPost);
        }



        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Native Sharing", style);


        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Text"))
        {
            UM_ShareUtility.ShareMedia("Title", "Some text to share");
        }

        StartX += 170;

        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Screehshot"))
        {
            StartCoroutine(PostScreenshot());
        }

        StartY += 55;
        StartX  = 10;
        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Whatsapp", style);

        StartY += 25;
        if (GUI.Button(new Rect(StartX, StartY, 150, 50), "Start Share"))
        {
            UM_ShareUtility.WhatsappShare("This is my text to share", textureForPost);
        }
    }
示例#12
0
 public void OnFBShare()
 {
     UM_ShareUtility.FacebookShare("market://details?id=com.peakrainbow.missionday");        //, textureForPost);
 }
示例#13
0
 public void OnTwShare()
 {
     UM_ShareUtility.TwitterShare("market://details?id=com.peakrainbow.missionday");        //, textureForPost);
 }
示例#14
0
 public override void OnEnter()
 {
     UM_ShareUtility.FacebookShare(message.Value, texture.Value as Texture2D);
     Finish();
 }
示例#15
0
 public override void OnEnter()
 {
     UM_ShareUtility.ShareMedia(caption.Value, message.Value, texture.Value as Texture2D);
     Finish();
 }
    // twitter sharing
    public void postTextureTwitter()
    {
        UM_ShareUtility.TwitterShare("@TeamLaunchable " + "#launchable", screenCap);
//		analyticsControl.screenshotShare("twitter");
    }
    // facebook sharing
    public void postTextureFB()
    {
        UM_ShareUtility.FacebookShare("@TeamLaunchable " + "#launchable", screenCap);
//		analyticsControl.screenshotShare("facebook");
    }
示例#18
0
 void OnMouseDown()
 {
     UM_ShareUtility.ShareMedia("360 Degrees", "This is my text to share");
     StartCoroutine(PostTwitterScreenshot());
 }
示例#19
0
 public void OnContact()
 {
     UM_ShareUtility.SendMail("Hello", "market://details?id=com.peakrainbow.missionday", "*****@*****.**");
 }