Details

Last Updated
4 weeks ago
First Uploaded
4 weeks ago
Downloads
506
Likes
0
Size
71KB
Dependency string
Jo912345-EntwinedFixed-1.0.0
Dependants

Categories

Entwined

An advanced Bopl Battle networking library.

Example:

[BepInDependency("com.entwinedteam.entwined")]
[BepInPlugin("com.yourname.myFirstEntwinedPlugin", "My First Entwined Plugin", 1.0.0)]
internal class MyPlugin : MonoBehaviour
{
    static EntwinedPacketChannel<string> helloWorldChannel;
    private void Awake()
    {
        helloWorldChannel = new EntwinedPacketChannel<string>(this, new StringEntwiner());

        helloWorldChannel.OnMessage += OnMessage;
    }

    private void OnGUI()
    {
        if (GUI.Button(new Rect(15, 120, 100, 40), "Send Packet"))
        {
            helloWorldChannel.SendMessage("Hello World!");
        }
    }

    private static void OnMessage(string payload, PacketSourceInfo sourceInfo)
    {
        Logger.LogInfo($"{sourceInfo.SenderSteamName}: {payload}");
    }
}

More info and documentation can be found on the github repo.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.