Нема описа
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.

UserWarningAppleAppStore.cs 859B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. using UnityEngine.Purchasing;
  3. using UnityEngine.UI;
  4. namespace Samples.Purchasing.AppleAppStore.CanMakePayments
  5. {
  6. public class UserWarningAppleAppStore : MonoBehaviour
  7. {
  8. public Text warningText;
  9. public void UpdateWarningText()
  10. {
  11. var currentAppStore = StandardPurchasingModule.Instance().appStore;
  12. var warningMessage = currentAppStore != AppStore.AppleAppStore ?
  13. "This sample is meant to be tested using the Apple App Store.\n" +
  14. $"The currently selected store is: {currentAppStore}.\n" +
  15. "Build the project for iOS and use the Apple App 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. }