MonoTest.cs 865 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Godot;
  2. using System;
  3. public class MonoTest : Node
  4. {
  5. public string OperatingSystem()
  6. {
  7. #if GODOT_WINDOWS
  8. return "Windows";
  9. #elif GODOT_LINUXBSD || GODOT_X11
  10. return "Linux (or BSD)";
  11. #elif GODOT_SERVER
  12. return "Server (Linux or BSD)";
  13. #elif GODOT_MACOS || GODOT_OSX
  14. return "macOS";
  15. #elif GODOT_ANDROID
  16. return "Android";
  17. #elif GODOT_IOS
  18. return "iOS";
  19. #elif GODOT_HTML5
  20. return "HTML5";
  21. #elif GODOT_HAIKU
  22. return "Haiku";
  23. #elif GODOT_UWP
  24. return "UWP (Windows 10)";
  25. #elif GODOT
  26. return "Other";
  27. #else
  28. return "Unknown";
  29. #endif
  30. }
  31. public string PlatformType()
  32. {
  33. #if GODOT_PC
  34. return "PC";
  35. #elif GODOT_MOBILE
  36. return "Mobile";
  37. #elif GODOT_WEB
  38. return "Web";
  39. #elif GODOT
  40. return "Other";
  41. #else
  42. return "Unknown";
  43. #endif
  44. }
  45. }