| 12345678910111213141516171819202122232425262728293031 | using ET;using System;namespace GFGGame{    public static class MessageHelper    {        public static async ETTask<IResponse> SendToServer(IActorLocationRequest request, bool showError = true)        {            IResponse response = null;            Session session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;            try            {                response = await session.Call(request);                if (showError)                {                    if (response.Error != ErrorCode.ERR_Success)                    {                        ErrorCodeController.Handler(response.Error);                    }                }                return response;            }            catch(Exception e)            {                Log.Error(e.ToString());                return null;            }        }    }}
 |