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.

UserWarningAppleAppStore.cs 904B

1234567891011121314151617181920212223242526
  1. using UnityEngine;
  2. using UnityEngine.Purchasing;
  3. using UnityEngine.UI;
  4. namespace Samples.Purchasing.AppleAppStore.FamilySharing
  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. && currentAppStore != AppStore.MacAppStore ?
  14. "This sample is meant to be tested using the Apple App Store.\n" +
  15. $"The currently selected store is: {currentAppStore}.\n" +
  16. "Build the project for iOS, tvOS, or macOS.\n\n" +
  17. "See README for more information and instructions on how to test this sample."
  18. : "";
  19. warningText.text = warningMessage;
  20. }
  21. }
  22. }