Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserWarningGooglePlayStore.cs 873B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. using UnityEngine.Purchasing;
  3. using UnityEngine.UI;
  4. namespace Samples.Purchasing.GooglePlay.HandlingDeferredPurchases
  5. {
  6. public class UserWarningGooglePlayStore : MonoBehaviour
  7. {
  8. public Text warningText;
  9. public void UpdateWarningText()
  10. {
  11. var currentAppStore = StandardPurchasingModule.Instance().appStore;
  12. var warningMessage = currentAppStore != AppStore.GooglePlay ?
  13. "This sample is meant to be tested using the Google Play Store.\n" +
  14. $"The currently selected store is: {currentAppStore}.\n" +
  15. "Build the project for Android and use the Google Play Store.\n\n" +
  16. "See README for more information and instructions on how to test this sample."
  17. : "";
  18. warningText.text = warningMessage;
  19. }
  20. }
  21. }