Based on https://youtu.be/nOKno82_gd0?si=i7zCyCndsfXXC8QI
- Use an Autoload in gdscript to call the C# SerialPort functions (allowing you to keep using GdScript as your main language).
- Add the toggle mono build plugin so that the C# build can be turned off (since we're only using one file that won't change); shaves some time off each run.
- .NET version of Godot 4
- .NET runtime installed
- Make sure there is a
your-project-name.csproj
file (should be auto created when you make a C# script) - Install the System.IO.Ports .NET package:
dotnet add package System.IO.Ports --version 7.0.0
- Build the project at least once
- Activate the Mono Build Toggler plugin
- Specify your port name and baud rate in
serial_port_handler.gd