Пример #1
0
    private UM_ShareDialogBuilder MakeSharingBuilder()
    {
        var builder = new UM_ShareDialogBuilder();

        builder.AddImage(Screenshot);
        return(builder);
    }
Пример #2
0
    private UM_ShareDialogBuilder GetSharingContent()
    {
        var builder = new UM_ShareDialogBuilder();

        builder.SetText("Hello world GIF");
        builder.SetUrl(m_SharableUrl);

        return(builder);
    }
Пример #3
0
    private UM_ShareDialogBuilder MakeSharingBuilder()
    {
        var builder = new UM_ShareDialogBuilder();

        builder.SetText("Hello world!");
        builder.SetUrl("https://stansassets.com/");

        //Juts generating simple red texture with 32x32 resolution
        var sampleRedTexture = SA_IconManager.GetIcon(Color.red, 32, 32);

        builder.AddImage(sampleRedTexture);

        return(builder);
    }
Пример #4
0
    private UM_ShareDialogBuilder MakeSharingBuilder()
    {
        var builder = new UM_ShareDialogBuilder();

        builder.SetText("Помоги, собрать загаданные слова!");
        builder.SetUrl("https://play.google.com/store/apps/details?id=" + Application.identifier);

        //Juts generating simple red texture with 32x32 resolution
        var sampleRedTexture = SA_IconManager.GetIcon(Color.red, 32, 32);

        builder.AddImage(screenShot());

        return(builder);
    }
Пример #5
0
        public IEnumerator ShareToWhatsapp()
        {
            var @lock   = new CallbackLock();
            var client  = UM_SocialService.SharingClient;
            var builder = new UM_ShareDialogBuilder();

            //Juts generating smaple red tuxture with 32x32 resolution
            Texture2D sampleRedTexture = SA_IconManager.GetIcon(Color.red, 32, 32);

            builder.AddImage(sampleRedTexture);

            client.ShareToWhatsapp(builder, (result) => {
                @lock.Unlock();
                Assert.IsTrue(result.IsSucceeded);
            });

            yield return(@lock.WaitToUnlock());
        }
        public IEnumerator SystemShareDialog()
        {
            var @lock   = new CallbackLock();
            var client  = UM_SocialService.SharingClient;
            var builder = new UM_ShareDialogBuilder();

            builder.SetText("Hello world!");
            builder.SetUrl("https://stansassets.com/");

            //Juts generating smaple red tuxture with 32x32 resolution
            Texture2D sampleRedTexture = SA_IconManager.GetIcon(Color.red, 32, 32);

            builder.AddImage(sampleRedTexture);

            client.SystemSharingDialog(builder, (result) => {
                @lock.Unlock();
                Assert.IsTrue(result.IsSucceeded);
            });

            yield return(@lock.WaitToUnlock());
        }
Пример #7
0
    public void OnClickShare()
    {
        var client  = UM_SocialService.SharingClient;
        var builder = new UM_ShareDialogBuilder();

#if PLATFORM_ANDROID
        builder.SetUrl("https://play.google.com/store/apps/details?id=com.saiked.headbouncer");
        builder.SetText("I have achived a high score of " + PlayerPrefsController.GetBestScore() + " in #HeadBouncer. Will you do better ? You can find this game on Google Play");
#elif PLATFORM_UNITY
        builder.SetUrl("https://apps.apple.com/us/app/head-bouncer/id1471767673");
        builder.SetText("I have achived a high score of " + PlayerPrefsController.GetBestScore() + " in #HeadBouncer. Will you do better ? You can find this game on App Store");
#endif

        client.SystemSharingDialog(builder, (result) => {
            if (result.IsSucceeded)
            {
                Debug.Log("Sharing started ");
            }
            else
            {
                Debug.Log("Failed to share: " + result.Error.FullMessage);
            }
        });
    }