I'm hacking on some BepInEx code, which is a Unity Game Modding framework, and one of the samples in the docs involves patching the random number generator to always return 4.
which is an example that has gotten a lot funnier since last month
Discussion
I'm hacking on some BepInEx code, which is a Unity Game Modding framework, and one of the samples in the docs involves patching the random number generator to always return 4.
which is an example that has gotten a lot funnier since last month
I forgot that I hate .net assemblies/.DLL nonsense
to access serial ports in C#, simply use System.IO.Ports, which is part of the System.IO.Ports.dll assembly. If that's not part of the Unity game you're already hacking, FUCK YOU!
I'm either going to have to switch to some other IPC, use the win32 api directly, or write a small program that does serial and just run that externally. none of those are fun
I don't really want to do any of them but I also have to stay up for 5 more hours, so I guess I get to do one or all of them
I think I found a stupid way to make it work:
dotnet publish -f netstandard2.1 --configuration Release
this builds it but copies all the needed DLLs into the bin\Release\netstandard2.1\publish\ folder, so I can hopefully scoop out all the ones I need and copy them into the game's folder
whelp. it's currently complaining that no, it can't run on my system, because sadly System.IO.Ports is only supported on Windows.
I didn't know Windows 11 was something other than Windows, how strange
I think it's because I'm doing a target-framework of netstandard2.1 which turns off windows-specific APIs, I guess.
which I don't think I can fix, because unity
new idea: UDP, the universal connector.
please tell me I don't have to import some external assembly to send UDP packets
I can write a 10 line python script to bent-pipe UDP packets out the serial port
@foone lmao I forgot about that! damnit I could've made that a timely reference