Add gRPC client module and its corresponding test case

This commit is contained in:
2025-07-14 16:51:47 +08:00
parent b3e0ef5104
commit 37d52aa631
5 changed files with 118 additions and 47 deletions

View File

@ -0,0 +1,19 @@
using Network;
using UnityEngine;
namespace Test
{
public class GrpcClientTest : MonoBehaviour
{
private async void Start()
{
var serverInfo = await GrpcClient.Instance.GetServerInfo();
Debug.Log($"Received info from server: {serverInfo}");
var loginResult = await GrpcClient.Instance.Login("野兽先辈", "114514");
Debug.Log($"Received login result: {loginResult.Result}");
}
}
}