Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

UserWarningGooglePlayStore.cs 876B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. using UnityEngine.Purchasing;
  3. using UnityEngine.UI;
  4. namespace Samples.Purchasing.GooglePlay.UpgradeDowngradeSubscription
  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. }