public async UniTask <AsyncResponseData <BuildingsResp> > ReadBuildingsAsync(ReadBuildingsReq request)
        {
            var resp = await Client.SendRequestAsync <ReadBuildingsReq, BuildingsResp>(DatabaseRequestTypes.RequestReadBuildings, request);

            if (!resp.IsSuccess)
            {
                Logging.LogError(nameof(DatabaseNetworkManager), $"Cannot {nameof(ReadBuildingsAsync)} status: {resp.ResponseCode}");
            }
            return(resp);
        }
Example #2
0
        public async UniTask <BuildingsResp> ReadBuildingsAsync(ReadBuildingsReq request)
        {
            var result = await Client.SendRequestAsync <ReadBuildingsReq, BuildingsResp>(DatabaseRequestTypes.RequestReadBuildings, request);

            if (result.ResponseCode != AckResponseCode.Success)
            {
                return(new BuildingsResp());
            }
            return(result.Response);
        }