public ShareScreenshotWithText ( string text ) : void | ||
text | string | |
return | void |
public void sharePressed() { string shareTextTemplate = SmartLocalization.LanguageManager.Instance.GetTextValue(gameSettings.inviteTextKey); string shareText = string.Format(shareTextTemplate, gameLogicController._score); shareController.ShareScreenshotWithText(shareText); }
public void ShareGame() { PlayButtonSound(); //Play click button sound. //This method will take a screenshot of game and it will add text with the url of the store where this game is published. StartCoroutine(NativeShare.ShareScreenshotWithText("OMG! I have reached " + score.ToString() + " points in Frog Tap! Can you beat my score?")); }
private IEnumerator ShareCoroutine() { m_DataBindContext["lastScore"] = GameController.instance.score; m_DataBindContext["lastCoins"] = GameController.instance.coins; m_DataBindContext["bestScore"] = GameData.instance.bestScore; yield return(new WaitForEndOfFrame()); #if UNITY_ANDROID var message = Localization.GetText("Share Message"); message = message.Replace("{score}", GameController.instance.score.ToString("N0")); message = message.Replace("{storeLink}", "https://play.google.com/store/apps/details?id=" + Application.bundleIdentifier); #endif NativeShare.ShareScreenshotWithText(message); }
public override void OnClicked() { int bestScore = PlayerPrefs.GetInt("BEST_SCORE"); string s = "My best STACX score: " + bestScore + ". Get it for free: " + URL; NativeShare m = GetComponent <NativeShare>(); if (m == null) { gameObject.AddComponent <NativeShare>(); } m = GetComponent <NativeShare>(); m.ShareScreenshotWithText(s, ""); // UM_ShareUtility.ShareMedia("Color swipe","My best score: " + bestScore + ". Get it for free: " + "http://barouch.fr/colorswipe.php",textureForPost); }
public void PostNative() { bool _isNeedScreenShot = m_ShareWithScreenShot; string _message = "Hey! Look a nice game!"; if (m_NativeSharePlugin == null) { Debug.LogError("WndStartScreenMainMenu : PostNative : m_NativeSharePlugin == null"); return; } if (_isNeedScreenShot == true) { // ADD SCREENSHOT m_NativeSharePlugin.ShareScreenshotWithText(_message); } else { // NO SCREENSHOT m_NativeSharePlugin.ShareText(_message); } }
public void share() { StartCoroutine(NativeShare.ShareScreenshotWithText(shareMessage)); }