SD_UPNP enables UPNP port forward rules to be set on the gateway router by using simple API calls in your script. After opening a port your game will be able to receive incoming traffic through that port, provided the client is running behind a UPNP compatible router.
The package consists of one single static class .cs file that gets added to your project.
The package is compatible with and builds fine for all existing Unity platforms even when using IL2CPP build.
Compatible with both TCP and UDP protocols.
API functions are as follows:
SD_UPNP.Initialise();
SD_UPNP.PortOpen(iPort, kProtocolOption, sNameOption);
SD_UPNP.IsPortOpen(iPort)
SD_UPNP.PortClose(iPort);
SD_UPNP.PortsClose();