Ejemplo n.º 1
0
        private void OnSearchComplete(UnityWebRequest request)
        {
            try
            {
                searchResult = request
                               .downloadHandler
                               .text
                               .JsonSerialize <OriginerPackageSearchModelDto>();
            }
            catch (Exception e)
            {
                Debug.LogError("Search response serialization error");
                Debug.LogException(e);
            }

            var isError = request.isHttpError | request.isNetworkError;

            if (isError)
            {
                Debug.LogError($"Search request error\nerror: {request.error}");
            }
        }
Ejemplo n.º 2
0
 private void RefreshPager(OriginerPackageSearchModelDto model, VisualElement pager)
 {
     pager.Q <Label>("currentPage").text = (model.page + 1).ToString();
     pager.Q <Label>("maxPage").text     = ((model.count / model.itemsPerPage) + 1).ToString();
 }