Skip to content

Commit 0222c36

Browse files
committed
docs(website): Fixed typos and code examples
1 parent 1b19a7b commit 0222c36

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/_docs/getting-started/connection-approval.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The ConnectionData will then be passed to the server and it will decide if the c
3636

3737

3838
### Timeout
39-
The MLAPI uses a callback system in order to allow for external validation. Forexample, you might have a steam authentication ticket sent as the ConnectionData (encrypted and authenticated by the MLAPI) that you want to validate against steams servers. This can take some time. If you don't call the callback method within the time specified in the ``ClientConnectionBufferTimeout`` configuration. The connection will be dropped. This time starts counting when the transport has told the MLAPI about the connection. This means that you cannot attack the MLAPI by never sending the buffer, it will still time you out.
39+
The MLAPI uses a callback system in order to allow for external validation. For example, you might have a steam authentication ticket sent as the ConnectionData (encrypted and authenticated by the MLAPI) that you want to validate against steams servers. This can take some time. If you don't call the callback method within the time specified in the ``ClientConnectionBufferTimeout`` configuration the connection will be dropped. This time starts counting when the transport has told the MLAPI about the connection. This means that you cannot attack the MLAPI by never sending the buffer, it will still time you out.
4040

4141

4242
### Security

docs/_docs/the-basics/messaging-system.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ void MyMethod(int myInt)
2323

2424
#### Convenience Example
2525
```csharp
26-
private void Update()
26+
private void OnGUI()
2727
{
28-
if (GUI.Button("SendRandomInt"))
28+
if (GUILayout.Button("SendRandomInt"))
2929
{
3030
if (IsServer)
3131
{
@@ -41,14 +41,14 @@ private void Update()
4141
[ServerRPC]
4242
private void MyServerRPC(int number)
4343
{
44-
Debug.Log("The number recieved was: " + number);
44+
Debug.Log("The number received was: " + number);
4545
Debug.Log("This method ran on the server upon the request of a client");
4646
}
4747

4848
[ClientRPC]
4949
private void MyClientRPC(int number)
5050
{
51-
Debug.Log("The number recieved was: " + number);
51+
Debug.Log("The number received was: " + number);
5252
Debug.Log("This method ran on the client upon the request of the server");
5353
}
5454
```
@@ -83,9 +83,9 @@ public float MyRpcWithReturnValue(float x, float y)
8383
To use the performance mode, the RPC method require the following signature ``void (ulong clientId, Stream readStream)`` and the sender is required to use the non generic Stream overload.
8484

8585
```csharp
86-
private void Update()
86+
private void OnGUI()
8787
{
88-
if (GUI.Button("SendRandomInt"))
88+
if (GUILayout.Button("SendRandomInt"))
8989
{
9090
if (IsServer)
9191
{
@@ -120,7 +120,7 @@ private void MyServerRPC(ulong clientId, Stream stream) //This signature is REQU
120120
using (PooledBitReader reader = PooledBitReader.Get(stream))
121121
{
122122
int number = reader.ReadInt32Packed();
123-
Debug.Log("The number recieved was: " + number);
123+
Debug.Log("The number received was: " + number);
124124
Debug.Log("This method ran on the server upon the request of a client");
125125
}
126126
}
@@ -131,7 +131,7 @@ private void MyClientRPC(ulong clientId, Stream stream) //This signature is REQU
131131
using (PooledBitReader reader = PooledBitReader.Get(stream))
132132
{
133133
int number = reader.ReadInt32Packed();
134-
Debug.Log("The number recieved was: " + number);
134+
Debug.Log("The number received was: " + number);
135135
Debug.Log("This method ran on the client upon the request of the server");
136136
}
137137
}
@@ -167,9 +167,9 @@ If you don't want to use the MLAPI's messaging. You don't have to. You can use a
167167

168168
#### Usage
169169
```csharp
170-
void Start()
170+
private void Start()
171171
{
172-
//Recieving
172+
//Receiving
173173
NetworkingManager.Singleton.OnIncommingCustomMessage += ((clientId, stream) =>
174174
{
175175
using (PooledBitReader reader = PooledBitReader.Get(stream))

0 commit comments

Comments
 (0)