Files
godot-demo-projects/misc/os_test/CSharpTest.cs
Hugo Locurcio 53d3f9cdde Improve Operating System Testing demo (#1124)
- Display more return values of Engine/OS methods such as system fonts,
  memory information and security information.
- Add headless support (the generated report is also printed to stdout).
- Improve theming in the generated report.
- Hide video adapter type if this information can't be queried in the
  current rendering method.
- Update C# script for Godot 4.x platform names.
2024-10-23 23:09:23 +02:00

41 lines
675 B
C#

using Godot;
public partial class CSharpTest : Node
{
public string OperatingSystem()
{
#if GODOT_WINDOWS
return "Windows";
#elif GODOT_LINUXBSD
return "Linux/*BSD";
#elif GODOT_MACOS
return "macOS";
#elif GODOT_ANDROID
return "Android";
#elif GODOT_IOS
return "iOS";
#elif GODOT_WEB
return "Web";
#elif GODOT
return "Other";
#else
return "Unknown";
#endif
}
public string PlatformType()
{
#if GODOT_PC
return "PC";
#elif GODOT_MOBILE
return "Mobile";
#elif GODOT_WEB
return "Web";
#elif GODOT
return "Other";
#else
return "Unknown";
#endif
}
}