Skip to content

Commit 23ebe85

Browse files
authored
Update README.md with example
1 parent 6f451df commit 23ebe85

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,27 @@
66
3. Click on the + icon (Add package from git URL...)
77
4. Enter URL: https://github.com/netvoid-labs/netgate-unity.git#upm
88

9-
109
## Dependencies
1110
- NativeWebSocket ( https://github.com/endel/NativeWebSocket )
1211

12+
## Example
13+
14+
```
15+
void Awake()
16+
{
17+
NetGate.Instance.OnConnected += OnConnected;
18+
}
19+
20+
void Start()
21+
{
22+
NetGate.Instance.Connect("localhost:4555", "12345678");
23+
}
24+
25+
void OnConnected()
26+
{
27+
Debug.LogError("Connected");
28+
}
29+
```
1330

1431
## License
15-
MIT
32+
MIT

0 commit comments

Comments
 (0)