Creator.cs 757 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. namespace UnityEngine.Monetization
  3. {
  4. static class Creator
  5. {
  6. static internal IMonetizationPlatform CreatePlatform()
  7. {
  8. try
  9. {
  10. #if UNITY_EDITOR || UNITY_ANDROID || UNITY_IOS
  11. return new Platform();
  12. #else
  13. return new UnsupportedPlatform();
  14. #endif
  15. }
  16. catch (Exception exception)
  17. {
  18. try
  19. {
  20. Debug.LogError("Error Initializing Unity Monetization.");
  21. Debug.LogError(exception.Message);
  22. }
  23. catch (MissingMethodException)
  24. {
  25. }
  26. return new UnsupportedPlatform();
  27. }
  28. }
  29. }
  30. }