UI 버그 전부 수정완료
This commit is contained in:
parent
31b5804fd8
commit
8107321f04
|
|
@ -2940,7 +2940,7 @@ MonoBehaviour:
|
|||
isOnSprite:
|
||||
- {fileID: 21300000, guid: 50a793ca026e5f94db805e7d6ef95009, type: 3}
|
||||
- {fileID: 21300000, guid: 56b1f3526ae1a484992f61111d77da10, type: 3}
|
||||
item: {fileID: 3565683730023604969, guid: 1f0354a7d9f779b43a2437d0e2712b91, type: 3}
|
||||
item: {fileID: 1680985025}
|
||||
results: {fileID: 560148188}
|
||||
listTop: {fileID: 1076792096}
|
||||
bar: {fileID: 281812711}
|
||||
|
|
@ -13579,6 +13579,17 @@ MonoBehaviour:
|
|||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_IsOn: 0
|
||||
--- !u!114 &1680985025 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 3565683730023604969, guid: 1f0354a7d9f779b43a2437d0e2712b91, type: 3}
|
||||
m_PrefabInstance: {fileID: 1262477021}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1da056f246b185842aae317b0faf0a3b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1685326729
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using BestHTTP;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -14,7 +15,7 @@ public class Common : MonoBehaviour
|
|||
|
||||
void Start()
|
||||
{
|
||||
NetworkManager.Instance.CreateRequest<List<CommonData>>("common/animalTypes", new object(), (data) =>
|
||||
HTTPRequest httpAnimal = NetworkManager.Instance.CreateRequest<List<CommonData>>("common/animalTypes", new object(), (data) =>
|
||||
{
|
||||
GameManager.Instance.animalTypes = data;
|
||||
List<string> strings = new List<string>();
|
||||
|
|
@ -23,8 +24,9 @@ public class Common : MonoBehaviour
|
|||
strings.Add(data[n].code_nm);
|
||||
}
|
||||
dAnimal.AddOptions(strings);
|
||||
}, null, BestHTTP.HTTPMethods.Get);
|
||||
NetworkManager.Instance.CreateRequest<List<CommonData>>("common/suitStyle", new object(), (data) =>
|
||||
|
||||
}, null, HTTPMethods.Get);
|
||||
HTTPRequest httpSuitStyle = NetworkManager.Instance.CreateRequest<List<CommonData>>("common/suitStyle", new object(), (data) =>
|
||||
{
|
||||
GameManager.Instance.suitStyle = data;
|
||||
List<string> strings = new List<string>();
|
||||
|
|
@ -33,8 +35,8 @@ public class Common : MonoBehaviour
|
|||
strings.Add(data[n].code_nm);
|
||||
}
|
||||
dSuitStyle.AddOptions(strings);
|
||||
}, null, BestHTTP.HTTPMethods.Get);
|
||||
NetworkManager.Instance.CreateRequest<List<CommonData>>("common/suitType", new object(), (data) =>
|
||||
}, null, HTTPMethods.Get);
|
||||
HTTPRequest httpSuitType = NetworkManager.Instance.CreateRequest<List<CommonData>>("common/suitType", new object(), (data) =>
|
||||
{
|
||||
GameManager.Instance.suitType = data;
|
||||
List<string> strings = new List<string>();
|
||||
|
|
@ -43,8 +45,8 @@ public class Common : MonoBehaviour
|
|||
strings.Add(data[n].code_nm);
|
||||
}
|
||||
dSuitType.AddOptions(strings);
|
||||
}, null, BestHTTP.HTTPMethods.Get);
|
||||
NetworkManager.Instance.CreateRequest<List<CommonData>>("common/region", new object(), (data) =>
|
||||
}, null, HTTPMethods.Get);
|
||||
HTTPRequest httpRegion = NetworkManager.Instance.CreateRequest<List<CommonData>>("common/region", new object(), (data) =>
|
||||
{
|
||||
GameManager.Instance.region = data;
|
||||
List<string> strings = new List<string>();
|
||||
|
|
@ -53,7 +55,11 @@ public class Common : MonoBehaviour
|
|||
strings.Add(data[n].code_nm);
|
||||
}
|
||||
dRegion.AddOptions(strings);
|
||||
}, null, BestHTTP.HTTPMethods.Get);
|
||||
}, null, HTTPMethods.Get);
|
||||
httpAnimal.Send();
|
||||
httpSuitStyle.Send();
|
||||
httpSuitType.Send();
|
||||
httpRegion.Send();
|
||||
}
|
||||
|
||||
public class CommonData
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using UnityEngine.UI;
|
|||
|
||||
public class ItemPrefab : MonoBehaviour, System.IEquatable<ItemPrefab>
|
||||
{
|
||||
[SerializeField]
|
||||
Library _library;
|
||||
public Library library { get { return _library; } }
|
||||
[SerializeField] TMP_Text suitName;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ using UnityEngine.Pool;
|
|||
using Cysharp.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using BestHTTP;
|
||||
|
||||
public class SearchCtrl : SingletonMonoBehaviour<SearchCtrl>
|
||||
{
|
||||
|
|
@ -135,7 +137,7 @@ public class SearchCtrl : SingletonMonoBehaviour<SearchCtrl>
|
|||
|
||||
var tcs = new TaskCompletionSource<bool>();
|
||||
|
||||
var searchRequest = NetworkManager.Instance.CreateRequest<SearchResponse>(
|
||||
HTTPRequest searchRequest = NetworkManager.Instance.CreateRequest<SearchResponse>(
|
||||
"library/select/suiters",
|
||||
request,
|
||||
(data) =>
|
||||
|
|
@ -228,6 +230,7 @@ public class SearchCtrl : SingletonMonoBehaviour<SearchCtrl>
|
|||
},
|
||||
(fail) =>
|
||||
{
|
||||
Debug.LogError("GetImage Fail");
|
||||
tcs.SetResult(null);
|
||||
},
|
||||
BestHTTP.HTTPMethods.Get
|
||||
|
|
@ -308,6 +311,7 @@ public class ImageResponse
|
|||
public byte[] imageBytes;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Library
|
||||
{
|
||||
public string imageBase64;
|
||||
|
|
|
|||
|
|
@ -44,13 +44,21 @@ public class NetworkManager : SingletonMonoBehaviour<NetworkManager>
|
|||
httpRquest.RawData = System.Text.Encoding.UTF8.GetBytes(json);
|
||||
}
|
||||
|
||||
httpRquest.Send();
|
||||
return httpRquest;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Texture2D 통신용 함수
|
||||
/// </summary>
|
||||
/// <param name="api"></param>
|
||||
/// <param name="serializeData"></param>
|
||||
/// <param name="onSuccess"></param>
|
||||
/// <param name="onFail"></param>
|
||||
/// <param name="methods"></param>
|
||||
/// <returns></returns>
|
||||
public HTTPRequest CreateImageRequest(string api, object serializeData, Action<Texture2D> onSuccess, Action<Texture2D> onFail = null, HTTPMethods methods = HTTPMethods.Post)
|
||||
{
|
||||
string url = $"{baseUrl}{api}".Replace("\\p{Z}", String.Empty);
|
||||
|
||||
var httpRquest = new HTTPRequest(new Uri(url) //url ³Ö±â
|
||||
, methods //µ¿ÀÛ ¹æ½Ä ³Ö±â
|
||||
, (request, response) => {
|
||||
|
|
@ -71,14 +79,6 @@ public class NetworkManager : SingletonMonoBehaviour<NetworkManager>
|
|||
string json = JsonConvert.SerializeObject(serializeData);
|
||||
httpRquest.RawData = System.Text.Encoding.UTF8.GetBytes(json);
|
||||
}
|
||||
|
||||
httpRquest.Send();
|
||||
return httpRquest;
|
||||
}
|
||||
|
||||
private IEnumerator<float> Sendearch()
|
||||
{
|
||||
//Timing.RunCoroutine(BuildingSet());
|
||||
yield return Timing.WaitForSeconds(0.1f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue