static void Init()
 {
     if (Dependencies.GetMetaDataReader().GetBool(MetaDataKeys.AutoInit, defaultValue: true))
     {
         GetSocial.Init();
     }
 }
Example #2
0
        public static UserId CurrentUser()
        {
            var currentUser = GetSocial.GetCurrentUser();

            return(currentUser == null ? new UserId() : new UserId {
                Id = currentUser.Id
            });
        }
 static void Init()
 {
     NativeBuildConfig.HadesUrl = PlayerPrefs.GetInt("hades", 0) == 0 ? NativeBuildConfig.HadesProductionUrl : NativeBuildConfig.HadesTestingUrl;
     if (Dependencies.GetMetaDataReader().GetBool(MetaDataKeys.AutoInit, defaultValue: true))
     {
         GetSocial.Init();
     }
 }
        public static THActivityPostContent ToRpcModel(this ActivityPostContent content)
        {
            var media = content._mediaAttachment;

            if (!media.IsSupported())
            {
                GetSocialLogs.W("Uploading Texture2D or video is not supported in Editor yet");
            }
            return(new THActivityPostContent
            {
                Text = content._text,
                ButtonTitle = content._buttonTitle,
                ButtonAction = content._buttonAction,
                Language = GetSocial.GetLanguage(),
                ImageUrl = media.GetImageUrl(),
                VideoUrl = media.GetVideoUrl(),
                Action = content._action.ToRpcModel()
            });
        }