mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
- 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.
41 lines
675 B
C#
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
|
|
}
|
|
}
|