Skip to content

Latest commit

 

History

History
 
 

example

Example

In order to use this example, you need to build reporter and get reporter.dll (Windows) or reporter.so (Linux).

Go to reporter's folder where Cargo.toml resides and execute the following console command:

cargo build --release

resulting binary will be located at target/release/

  • for Windows, create a new folder bin in the folder of the example project (next to the lib folder), then in bin create win64 folder and put reporter.dll there,
  • for Linux, create a new folder bin in the folder of the example project (next to the lib folder), then in bin create x11_64 folder and put reporter.so there,

open project in Godot and in "FileSystem" panel open folder lib and file reporter.gdnlib, this will show a new panel in which you need to check that "Dynamic Library" path is correct for your platform (Windows/Linux).

After that, you need to start the server or monitor and change the port in MainScene.gd in func _ready() on the line:
reporter.set_server(127, 0, 0, 1, 50123); # where 50123 is your port
according to the port your server uses (will be printed when the server is started).