A new version of the core has been released!
Async RPCs
A new feature called "Async RPCs" has been implemented. This allows you to return a value over an RPC, and use `async / await` in order to use it, so you will no longer need to bounce RPCs back and forth to get a value from the server to the client or vice versa.
Example:
Server:
RpcManager.Instance.RegisterAsyncRPC<SingleCastRpc<string>, EmptyRpc>("Async.RequestMapName", (player, request) =>
{
return new SingleCastRpc<string>(GameServer.Announcement.MapName);
});
Client:
Task.Run(async () =>
{
string name = (await RpcManager.Instance.TriggerAsyncRpc<SingleCastRpc<string>>("Async.RequestMapName", new EmptyRpc())).Value;
ChatBox.WriteLine($"Map name: {name}");
});
Updating
In order to update an existing project use `slipe update-core`