From 1ed11636bb610090e4edab58ad4733188fcee862 Mon Sep 17 00:00:00 2001 From: Rug Date: Fri, 17 May 2024 11:18:20 -0700 Subject: [PATCH] Update README.md to reflect v1.0.14 changes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de3305a..8e31b91 100644 --- a/README.md +++ b/README.md @@ -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] @@ -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);