Пример #1
0
    public void Share()
    {
        string description = string.Format("WOW! I reached level {0}!", level);

        if (OK.IsLoggedIn)
        {
            //OK.OpenPhotoDialog(uploadResponse => {
            Debug.Log("Photo uploaded!");
            OK.OpenPublishDialog(PublishCallback, new List <OKMedia>()
            {
                OKMedia.Photo(texture),
                OKMedia.Text(description)
            });

/*
 *      }, () => {
 *                              OK.OpenPublishDialog(PublishCallback, new List<OKMedia>()
 *                              {
 *                                      OKMedia.Photo(texture),
 *                                      OKMedia.Text(description)
 *                              });
 *                      },
 *                      texture, description);
 */
        }
        Close();
    }
Пример #2
0
 private void Share(string text, string link, string title, Texture2D image)
 {
     OK.OpenPublishDialog(
         response =>
     {
         if (response != null && response.Object != null && response.Object.ContainsKey("error_code"))
         {
         }
         else if (response != null)
         {
             AchievementsManager.Instance.CheckAchievements(TasksTypes.Share);
         }
     },
         new List <OKMedia>()
     {
         OKMedia.Text(text),
         OKMedia.Photo(image),
         OKMedia.Link(link)
     });
 }