https://github.com/xjine/unity_ipendpointinfo
IPEndPoint wrapper to setup from Inspector.
https://github.com/xjine/unity_ipendpointinfo
assets unity
Last synced: about 1 month ago
JSON representation
IPEndPoint wrapper to setup from Inspector.
- Host: GitHub
- URL: https://github.com/xjine/unity_ipendpointinfo
- Owner: XJINE
- License: bsd-3-clause
- Created: 2019-05-23T11:33:53.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-06-26T01:31:28.000Z (about 1 year ago)
- Last Synced: 2025-06-26T02:31:49.599Z (about 1 year ago)
- Topics: assets, unity
- Language: C#
- Size: 107 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity_IPEndPointInfo

IPEndPoint wrapper to setup from Inspector.
## Importing
You can use Package Manager or import it directly.
```
https://github.com/XJINE/Unity_IPEndPointInfo.git?path=Assets/Packages/IPEndPointInfo
```
## How to Use
Set ``address`` and ``port`` field. And get ``IPEndPoint`` from property.
The source is quite simple.
```csharp
[SerializeField] private string address;
[SerializeField] private int port;
private IPEndPoint _ipEndPoint;
public string Address
{
get => address;
set
{
address = value;
_ipEndPoint = new IPEndPoint(IPAddress.Parse(address), port);
}
}
public int Port
{
get => port;
set
{
port = value;
_ipEndPoint = new IPEndPoint(IPAddress.Parse(address), port);
}
}
public IPEndPoint IPEndPoint => _ipEndPoint ??= new IPEndPoint(IPAddress.Parse(address), port);
```