public async Task <PlayerGameItem> LoadCurrentScene(string theme)
        {
            Channel channel = ChannelFactory.GetChannel();

            var client = new CreationProvider.CreationProviderClient(channel);

            var request = new GetCreationRequest();

            request.World = theme.ToLower();

            var reply = await client.GetCreationAsync(request);

            channel.ShutdownAsync().Wait();

            return(PopulatePlayerGameItem(reply));
        }
Exemplo n.º 2
0
    public async Task TestRpc1()
    {
        try
        {
            Channel channel = ChannelFactory.GetChannel();

            var client = new CreationProvider.CreationProviderClient(channel);

            //var reply = await client.GetCreationAsync(new Google.Protobuf.WellKnownTypes.Empty());
            var request = new GetCreationRequest();
            request.World = "lido";
            var reply = await client.GetCreationAsync(request);

            channel.ShutdownAsync().Wait();
            Debug.Log(JsonConvert.SerializeObject(reply));
        }
        catch (System.Exception e)
        {
            Debug.Log(e.Message);
        }
    }