• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Jul-2020-

Properties/H09-Jul-2020-2610

screenshots/H07-May-2022-

MonoTest.csH A D09-Jul-20201.8 KiB9489

Operating System Testing.csprojH A D09-Jul-20202.9 KiB6160

Operating System Testing.slnH A D09-Jul-20201,008 2019

README.mdH A D09-Jul-20201.4 KiB3826

actions.gdH A D09-Jul-20202 KiB7646

icon.png.importH A D09-Jul-2020640 3529

os_test.gdH A D09-Jul-20205.4 KiB151129

os_test.tscnH A D09-Jul-20207.4 KiB215189

project.godotH A D09-Jul-2020710 3725

README.md

1# Operating System Testing
2
3This demo showcases various OS-specific features in Godot.
4It can be used to test Godot while porting it to a
5new platform or to check for regressions.
6
7In a nutshell, this demo shows how you can get information from the
8operating system, or interact with the operating system.
9
10Language: GDScript and some [C#](https://docs.godotengine.org/en/latest/getting_started/scripting/c_sharp/index.html)
11(Mono is NOT required to run this demo)
12
13Renderer: GLES 2
14
15## How does it work?
16
17The [`OS`](https://docs.godotengine.org/en/latest/classes/class_os.html)
18class provides an abstraction layer over the platform-dependent code.
19OS wraps the most common functionality to communicate with the host
20operating system, such as the clipboard, video driver, date and time,
21timers, environment variables, execution of binaries, command line, etc.
22
23The buttons are connected to a node with the `actions.gd` script, which
24perform actions using the OS class.
25The text on the left is filled in using the `os_test.gd` script,
26which gathers information about the OS using the OS class.
27
28On a Mono-enabled version of Godot, Godot will load `MonoTest.cs` into
29the `MonoTest` node. Then, information determined by
30[`C# preprocessor defines`](https://docs.godotengine.org/en/latest/getting_started/scripting/c_sharp/c_sharp_features.html#preprocessor-defines)
31will be added to the left panel.
32
33## Screenshots
34
35![Top HiDPI](screenshots/top-hidpi.png)
36
37![Mono](screenshots/mono.png)
38