b3agz / UDP-Receiver-for-Unity-Godot

Designed to work with Streamer.bot, these scripts for both Unity and Godot 4 receive UDP Broadcasts and trigger custom events.
MIT License
7 stars 1 forks source link

Reorganize such that pure C# code is contained in a common file, and there are engine-specific wrappers for the UDP functionality. #2

Closed Helpsypoo closed 4 months ago

Helpsypoo commented 4 months ago

The idea is that this would make it easier to maintain, since only one file needs to change if, for example, Streamer.bot changes how events are sent.

Also, the Godot and Unity classes are abstract and intended to be inherited from. This means users of the library don't need to touch the repo and can just make their own classes that follow pattern of the Example class for their engine. This separation between the user's own code and the library makes it easier for them to receive future updates or contribute to the project.

I haven't fully tested this in Unity, since there was some issue with assemblies, and I couldn't access the internal JsonSerializerOptions. But I think it should be easy to fix if I broke something.