Hugo Locurcio 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 9 месяцев назад
..
screenshots fcc7d5c723 Optimize PNG images using oxipng 4 лет назад
CSharpTest.cs 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 год назад
Operating System Testing.csproj bbe50fc9da Convert demos to Godot 4 using regular expressions in a script 2 лет назад
Operating System Testing.sln 2979f85185 Update C# demos for Godot 3.2.3 4 лет назад
README.md fc54dd9c23 Fix README files, especially in Android IAP demos 4 лет назад
actions.gd 24bd3745e3 Fix and update the Operating System Testing demo (#818) 1 год назад
icon.webp f6ac674864 Add icons for several projects (#886) 1 год назад
icon.webp.import f6ac674864 Add icons for several projects (#886) 1 год назад
os_test.gd da6fffbc81 Update Operating System Testing demo for 4.0.rc2 (#847) 1 год назад
os_test.tscn da6fffbc81 Update Operating System Testing demo for 4.0.rc2 (#847) 1 год назад
project.godot 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 9 месяцев назад

README.md

Operating System Testing

This demo showcases various OS-specific features in Godot. It can be used to test Godot while porting it to a new platform or to check for regressions.

In a nutshell, this demo shows how you can get information from the operating system, or interact with the operating system.

Language: GDScript and some C# (Mono is NOT required to run this demo)

Renderer: GLES 2

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/677

How does it work?

The OS class provides an abstraction layer over the platform-dependent code. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc.

The buttons are connected to a node with the actions.gd script, which perform actions using the OS class. The text on the left is filled in using the os_test.gd script, which gathers information about the OS using the OS class.

On a Mono-enabled version of Godot, Godot will load MonoTest.cs into the MonoTest node. Then, information determined by C# preprocessor defines will be added to the left panel.

Screenshots

Top HiDPI

Mono