Skip to content

Commit

Permalink
Update README.md to reflect v1.0.14 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RugbugRedfern authored May 17, 2024
1 parent 2efbc5c commit 1ed1163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Landfall has asked mod developers not to send lots of data through Photon, which
## Using RPCs

### Defining RPCs
To define an RPC, simply add the [CustomRPC] attribute to a method:
To define an RPC, simply add the `[CustomRPC]` attribute to a method:

```cs
[CustomRPC]
Expand Down Expand Up @@ -93,7 +93,7 @@ The host can set lobby data using `MyceliumNetwork.SetLobbyData` and passing in
MyceliumNetwork.SetLobbyData("foo", "bar");
```

Values are serialized as strings (Steam requires it), so any type that can be serialized as a string can be used. To serialize custom types, override the `.ToString()` method.
Values are serialized as strings (Steam requires it), so any type that can be serialized as a string can be used. To serialize your own custom types you will need to convert them to a string yourself (and back from a string when you get the data).
```cs
MyceliumNetwork.SetLobbyData("money", 123);
MyceliumNetwork.SetLobbyData("scoreMultiplier", 12.52f);
Expand Down

0 comments on commit 1ed1163

Please sign in to comment.