// 찍은 사진을 Panel에 보여준다.
    void GetPirctureAndShowIt()
    {
        string pathToFile = GetPicture.GetLastPicturePath();

        if (pathToFile == null)
        {
            return;
        }
        Texture2D texture = GetScreenshotImage(pathToFile);
        Sprite    sp      = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));

        panel.SetActive(true);
        shareButtons.SetActive(true);
        panel.GetComponent <Image>().sprite = sp;
    }
예제 #2
0
    bool firstCount;                        // 첫번째 실행인지 체크하기 위한 변수

    public void Share_Button()
    {
        if (!firstCount)
        {
            GameCenterManager.Instance.SuccessDeviceAchievement(GameCenterManager.MyAchievement.ShareYourLight);
            firstCount = true;
        }

        // 공유버튼 사라짐
        ShareButtons.SetActive(false);

        new NativeShare().AddFile(GetPicture.GetLastPicturePath()).SetSubject("Shine Bright")
        .SetText("Now Playing♪: " + AudioManager.Instance.audios[0].clip.name + ", \n"
                 + "Download Link: https://play.google.com/store/apps/details?id=com.TeamSalmon.ShineBright \n" +
                 " #ShineBright").Share();
    }
예제 #3
0
    public void LoginCompleteWithCompose(TwitterSession session)
    {
        if (LanguageManager.nowLoc == Location.Korean)
        {
            frontStr = "Download: ";
        }
        else if (LanguageManager.nowLoc == Location.Japanese)
        {
            frontStr = "Download: ";
        }
        else
        {
            frontStr = "Download: ";
        }
        string imageUri = "file://" + GetPicture.GetLastPicturePath();

        Twitter.Compose(session, imageUri, frontStr, new string[] { hashtagStr },
                        (string tweetId) => { UnityEngine.Debug.Log("Tweet Success, tweetId=" + tweetId); },
                        (ApiError error) => { UnityEngine.Debug.Log("Tweet Failed " + error.message); },
                        () => { Debug.Log("Compose cancelled"); }
                        );
    }