UserWarning.cs 813 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using UnityEngine;
  3. using UnityEditor;
  4. using UnityEngine.Purchasing;
  5. using UnityEngine.UI;
  6. namespace Samples.Purchasing.Core.LocalReceiptValidation
  7. {
  8. public class UserWarning : MonoBehaviour
  9. {
  10. public Text warningText;
  11. public void Clear()
  12. {
  13. warningText.text = "";
  14. }
  15. public void WarnInvalidStore(AppStore currentAppStore)
  16. {
  17. var warningMsg = $"The cross-platform validator is not implemented for the currently selected store: {currentAppStore}. \n" +
  18. "Build the project for Android, iOS, macOS, or tvOS and use the Google Play Store or Apple App Store. See README for more information.";
  19. Debug.LogWarning(warningMsg);
  20. warningText.text = warningMsg;
  21. }
  22. }
  23. }