增加confirm类型;国家省份城市json;增加列表缓存
This commit is contained in:
parent
9bc3864790
commit
60bf5bd59d
1
Assets/Resources/UI/simpleCountry.json
Normal file
1
Assets/Resources/UI/simpleCountry.json
Normal file
File diff suppressed because one or more lines are too long
7
Assets/Resources/UI/simpleCountry.json.meta
Normal file
7
Assets/Resources/UI/simpleCountry.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9797c68ac7196ac4d92a65adac8b727f
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -121,6 +121,187 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &162959610
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 162959611}
|
||||
- component: {fileID: 162959614}
|
||||
- component: {fileID: 162959613}
|
||||
- component: {fileID: 162959612}
|
||||
m_Layer: 5
|
||||
m_Name: RawImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &162959611
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 162959610}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 733563076}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 7, y: -12}
|
||||
m_SizeDelta: {x: 379.06195, y: 383.4452}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &162959612
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 162959610}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 97bc2ebab6563400c95b036136d26ea6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Inverse: 0
|
||||
m_MaskInteraction: 85
|
||||
m_UseStencil: 1
|
||||
m_RaycastFilter: 0
|
||||
--- !u!114 &162959613
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 162959610}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 2800000, guid: 60705e3e465673d4686e583eaea3c88f, type: 3}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!222 &162959614
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 162959610}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &733563075
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 733563076}
|
||||
- component: {fileID: 733563078}
|
||||
- component: {fileID: 733563077}
|
||||
- component: {fileID: 733563079}
|
||||
m_Layer: 5
|
||||
m_Name: RawImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &733563076
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 733563075}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 162959611}
|
||||
m_Father: {fileID: 5779676824772088956}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 200}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &733563077
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 733563075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 2800000, guid: 960b10a47181377448edcf97871d8abe, type: 3}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!222 &733563078
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 733563075}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &733563079
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 733563075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 385b7d1277b6c4007a84c065696e0f8c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ShowMaskGraphic: 1
|
||||
m_DownSamplingRate: 1
|
||||
m_Softness: 1
|
||||
m_Alpha: 1
|
||||
m_IgnoreParent: 0
|
||||
m_PartOfParent: 0
|
||||
m_IgnoreSelfGraphic: 0
|
||||
m_IgnoreSelfStencil: 0
|
||||
--- !u!1 &845512357
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -322,9 +503,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 953f0e846565c4086a4bcdc6bc14cf85, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_NowVersion: 2.0.1-20210226
|
||||
m_NewVersion:
|
||||
m_ChartList: []
|
||||
--- !u!4 &1079865534
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -592,7 +770,8 @@ RectTransform:
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 733563076}
|
||||
m_Father: {fileID: 1678571401}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
||||
28
Assets/Scripts/Apis/Models/CountryInfo.cs
Normal file
28
Assets/Scripts/Apis/Models/CountryInfo.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scripts.Apis.Models
|
||||
{
|
||||
public class CountryInfo
|
||||
{
|
||||
public string name { get; set; }
|
||||
public List<ProvinceInfo> states;
|
||||
}
|
||||
public class CityInfo
|
||||
{
|
||||
public string name { get;set; }
|
||||
}
|
||||
public class ProvinceInfo
|
||||
{
|
||||
public string name { get; set; }
|
||||
public List<CityInfo> cities;
|
||||
}
|
||||
public class ChinaCityObject
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string province { get; set; }
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Apis/Models/CountryInfo.cs.meta
Normal file
11
Assets/Scripts/Apis/Models/CountryInfo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a73f6936353246a4eaa680de61dd1fdf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -44,7 +44,7 @@ public static class App
|
||||
|
||||
public static IPEndPoint UdpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||
public static IPEndPoint TcpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11001);
|
||||
|
||||
public static Dictionary<string, Dictionary<dynamic, Texture>> propTextureCache;
|
||||
static App()
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
@ -52,5 +52,11 @@ public static class App
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
#endif
|
||||
propTextureCache = new Dictionary<string, Dictionary<dynamic, Texture>>()
|
||||
{
|
||||
{"mapImgCache",new Dictionary<dynamic, Texture>() },
|
||||
{"mapHBCache",new Dictionary<dynamic, Texture>() },
|
||||
{"recordCache",new Dictionary<dynamic, Texture>() },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,6 +51,6 @@ namespace Assets.Scripts
|
||||
return _thirdPartApi;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -300,7 +300,7 @@ public class LoginController : MonoBehaviour
|
||||
UIManager.ShowConfirm("Quit", "Do you want to quit PowerFun?", () =>
|
||||
{
|
||||
Application.Quit();
|
||||
});
|
||||
},2);
|
||||
});
|
||||
}
|
||||
|
||||
@ -341,7 +341,6 @@ public class LoginController : MonoBehaviour
|
||||
//browser.
|
||||
}
|
||||
}
|
||||
|
||||
wxLogin2 = mainContent.Find("FormContainer-wx2");
|
||||
if (wxLogin2 != null)
|
||||
{
|
||||
|
||||
@ -37,12 +37,12 @@ public class MainController : MonoBehaviour
|
||||
UIManager.Instance.Root = root;
|
||||
UIManager.Instance.MainPanel = this.transform.Find("Panel").GetComponent<PFUIPanel>();
|
||||
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
||||
|
||||
if (App.CurrentUser == null)
|
||||
#if UNITY_EDITOR
|
||||
if (App.CurrentUser == null) //App.CurrentUser == null
|
||||
{
|
||||
await Login();
|
||||
}
|
||||
|
||||
#endif
|
||||
//MainMenu.transform.Find("Home").GetComponent<Button>().onClick.AddListener(() =>
|
||||
//{
|
||||
// UIManager.ShowHomePanel();
|
||||
|
||||
@ -69,6 +69,17 @@ public class Confirm : PFUIPanel
|
||||
_callback = callback;
|
||||
}
|
||||
|
||||
public void SetType(int type)
|
||||
{
|
||||
string ok = "Ok",cancel = "Cancel";
|
||||
if (type == 2)
|
||||
{
|
||||
ok = "Yes";
|
||||
cancel = "No";
|
||||
}
|
||||
_ok.transform.Find("Text").GetComponent<Text>().text = ok;
|
||||
_cancel.transform.Find("Text").GetComponent<Text>().text = cancel;
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
@ -97,4 +108,5 @@ public class Confirm : PFUIPanel
|
||||
this.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class MainNav : MonoBehaviour
|
||||
{
|
||||
UIManager.ShowConfirm("Quit", "Do you want to quit PowerFun?", ()=> {
|
||||
Application.Quit();
|
||||
});
|
||||
},2);
|
||||
});
|
||||
|
||||
UIManager.AddEvent(transform.Find("Setting").gameObject, EventTriggerType.PointerClick, x =>
|
||||
|
||||
@ -96,7 +96,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage);
|
||||
|
||||
|
||||
transform.Find("Hot").gameObject.SetActive(myMap.IsFire);
|
||||
var props = transform.Find("Props");
|
||||
@ -115,7 +115,30 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
UIManager.Instance.collectDict[myMap.IsFavorite];
|
||||
transform.Find("BtnInfo").GetComponent<Button>().onClick.AddListener(Info);
|
||||
transform.Find("BtnRide").GetComponent<Button>().onClick.AddListener(Ride);
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph);
|
||||
if (App.propTextureCache["mapImgCache"].ContainsKey(myMap.Id))
|
||||
{
|
||||
transform.Find("MapTitleImg").GetComponent<RawImage>().texture =
|
||||
App.propTextureCache["mapImgCache"][myMap.Id];
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage, (t) =>
|
||||
{
|
||||
App.propTextureCache["mapImgCache"].Add(myMap.Id, t);
|
||||
});
|
||||
}
|
||||
if (App.propTextureCache["mapHBCache"].ContainsKey(myMap.Id))
|
||||
{
|
||||
transform.Find("MapHBImg").GetComponent<RawImage>().texture =
|
||||
App.propTextureCache["mapHBCache"][myMap.Id];
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph,(t)=>
|
||||
{
|
||||
App.propTextureCache["mapHBCache"].Add(myMap.Id, t);
|
||||
});
|
||||
}
|
||||
SetActive4Button(false);
|
||||
}
|
||||
|
||||
@ -159,7 +182,10 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
}
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
if (localY != null)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
}
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
transform.Find("Shadow").gameObject.SetActive(false);
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
|
||||
@ -258,7 +258,7 @@ public class EditUserController : PFUIPanel
|
||||
{
|
||||
SceneManager.LoadScene("1-Login");
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
},2);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
@ -34,7 +34,7 @@ public class UserInfoController : PFUIPanel
|
||||
{
|
||||
SceneManager.LoadScene("1-Login");
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
},2);
|
||||
});
|
||||
infoPanel = transform.Find("InfoPanel").Find("P");
|
||||
|
||||
|
||||
@ -34,7 +34,17 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
|
||||
left = transform.Find("Left");
|
||||
row1 = left.Find("Main").Find("Row1");
|
||||
row2 = left.Find("Main").Find("Row2");
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("CoverImage").GetComponent<RawImage>(), result.RouteImage);
|
||||
if (App.propTextureCache["recordCache"].ContainsKey(result.Id))
|
||||
{
|
||||
transform.Find("CoverImage").GetComponent<RawImage>().texture = App.propTextureCache["recordCache"][result.Id];
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("CoverImage").GetComponent<RawImage>(), result.RouteImage,(t)=>
|
||||
{
|
||||
App.propTextureCache["recordCache"].Add(result.Id, t);
|
||||
});
|
||||
}
|
||||
left.Find("Main").Find("Name").GetComponent<Text>().text = result.RouteName;
|
||||
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
row1.Find("Time").GetComponent<Text>().text = $"<color={titleColor}>Riding time:</color>{result.TrainingTime}";
|
||||
|
||||
@ -9,6 +9,9 @@ using Newtonsoft.Json;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
@ -154,6 +157,9 @@ public class UIManager : MonoBehaviour
|
||||
{ false,Resources.Load<Sprite>("Images/p-4灰")},
|
||||
{ true,Resources.Load<Sprite>("Images/p-4")},
|
||||
};
|
||||
var a = Resources.Load<TextAsset>("UI/simpleCountry");
|
||||
var clist = JsonConvert.DeserializeObject<List<CountryInfo>>(a.text);
|
||||
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
@ -392,6 +398,8 @@ public class UIManager : MonoBehaviour
|
||||
|
||||
public static void ShowMapListPanel()
|
||||
{
|
||||
Debug.Log("清空");
|
||||
App.propTextureCache["recordCache"].Clear();
|
||||
UIManager.Show(UIManager.Instance.MapListPanel, UIManager.Instance.MainPanel);
|
||||
}
|
||||
public static void ShowMapDetailPanel(int id)
|
||||
@ -563,7 +571,7 @@ public class UIManager : MonoBehaviour
|
||||
}
|
||||
|
||||
Confirm confirm = null;
|
||||
public static void ShowConfirm(string title, string content, UnityAction action)
|
||||
public static void ShowConfirm(string title, string content, UnityAction action,int type=1)
|
||||
{
|
||||
if (UIManager.Instance == null)
|
||||
{
|
||||
@ -580,6 +588,7 @@ public class UIManager : MonoBehaviour
|
||||
UIManager.Instance.confirm.Show();
|
||||
UIManager.Instance.confirm.Set(title, content, action);
|
||||
}
|
||||
UIManager.Instance.confirm.SetType(type);
|
||||
}
|
||||
public static void CloseConfirm()
|
||||
{
|
||||
@ -634,4 +643,5 @@ public class UIManager : MonoBehaviour
|
||||
{
|
||||
UIManager.Instance = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -199,28 +199,36 @@ namespace Assets.Scripts
|
||||
}
|
||||
else UnityEngine.Object.DestroyImmediate(child.gameObject);
|
||||
}
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
}
|
||||
/*删除父亲节点下的所有孩子*/
|
||||
|
||||
/*显示网络图片*/
|
||||
public delegate Coroutine StartCoroutine(IEnumerator routine);
|
||||
public static void DisplayImage(StartCoroutine startCoroutine,RawImage img, string url)
|
||||
public static void DisplayImage(StartCoroutine startCoroutine,RawImage img, string url, Action<Texture> action=null)
|
||||
{
|
||||
startCoroutine(DownloadImage(img, url));
|
||||
startCoroutine(DownloadImage(img, url,action));
|
||||
}
|
||||
|
||||
public static void DisplayImageAysnc(StartCoroutine startCoroutine, RawImage img, string url,Action<string> action)
|
||||
{
|
||||
startCoroutine(DownloadImageCallBack(img, url, action));
|
||||
}
|
||||
static IEnumerator DownloadImage(RawImage img,string MediaUrl)
|
||||
static IEnumerator DownloadImage(RawImage img,string MediaUrl, Action<Texture> action = null)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
|
||||
yield return request.SendWebRequest();
|
||||
if (request.isNetworkError || request.isHttpError)
|
||||
Debug.Log(request.error);
|
||||
else
|
||||
else
|
||||
{
|
||||
img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke(img.texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static IEnumerator DownloadImageCallBack(RawImage img, string MediaUrl,Action<string> action)
|
||||
|
||||
@ -18,7 +18,7 @@ PlayerSettings:
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.20784314, g: 0.20784314, b: 0.2627451, a: 1}
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_ShowUnitySplashLogo: 0
|
||||
m_SplashScreenOverlayOpacity: 1
|
||||
m_SplashScreenAnimation: 1
|
||||
m_SplashScreenLogoStyle: 1
|
||||
@ -42,15 +42,7 @@ PlayerSettings:
|
||||
m_SplashScreenLogos:
|
||||
- logo: {fileID: 21300000, guid: e5cb6c21d2f3d0746ad3437ddd022558, type: 3}
|
||||
duration: 2
|
||||
- logo: {fileID: 10404, guid: 0000000000000000e000000000000000, type: 0}
|
||||
duration: 2
|
||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||
m_ShowUnitySplashAds: 0
|
||||
m_AdsAndroidGameId:
|
||||
m_AdsIosGameId:
|
||||
m_ShowSplashAdsSlogan: 0
|
||||
m_SloganImage: {fileID: 0}
|
||||
m_SloganHeight: 150
|
||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1024
|
||||
defaultScreenHeight: 768
|
||||
@ -121,14 +113,10 @@ PlayerSettings:
|
||||
switchNVNShaderPoolsGranularity: 33554432
|
||||
switchNVNDefaultPoolsGranularity: 16777216
|
||||
switchNVNOtherPoolsGranularity: 16777216
|
||||
switchNVNMaxPublicTextureIDCount: 0
|
||||
switchNVNMaxPublicSamplerIDCount: 0
|
||||
stadiaPresentMode: 0
|
||||
stadiaTargetFramerate: 0
|
||||
vulkanNumSwapchainBuffers: 3
|
||||
vulkanEnableSetSRGBWrite: 0
|
||||
vulkanEnableLateAcquireNextImage: 0
|
||||
useSecurityBuild: 0
|
||||
m_SupportedAspectRatios:
|
||||
4:3: 1
|
||||
5:4: 1
|
||||
@ -242,7 +230,6 @@ PlayerSettings:
|
||||
metalEditorSupport: 1
|
||||
metalAPIValidation: 1
|
||||
iOSRenderExtraFrameOnPause: 0
|
||||
iosCopyPluginsCodeInsteadOfSymlink: 0
|
||||
appleDeveloperTeamID:
|
||||
iOSManualSigningProvisioningProfileID:
|
||||
tvOSManualSigningProvisioningProfileID:
|
||||
@ -341,7 +328,6 @@ PlayerSettings:
|
||||
- m_BuildTarget: WebGL
|
||||
m_StaticBatching: 0
|
||||
m_DynamicBatching: 0
|
||||
m_BuildTargetEncrypting: []
|
||||
m_BuildTargetGraphicsJobs:
|
||||
- m_BuildTarget: MacStandaloneSupport
|
||||
m_GraphicsJobs: 0
|
||||
@ -570,7 +556,6 @@ PlayerSettings:
|
||||
ps4ShareFilePath:
|
||||
ps4ShareOverlayImagePath:
|
||||
ps4PrivacyGuardImagePath:
|
||||
ps4ExtraSceSysFile:
|
||||
ps4NPtitleDatPath:
|
||||
ps4RemotePlayKeyAssignment: -1
|
||||
ps4RemotePlayKeyMappingDir:
|
||||
@ -613,8 +598,6 @@ PlayerSettings:
|
||||
ps4disableAutoHideSplash: 0
|
||||
ps4videoRecordingFeaturesUsed: 0
|
||||
ps4contentSearchFeaturesUsed: 0
|
||||
ps4CompatibilityPS5: 0
|
||||
ps4GPU800MHz: 1
|
||||
ps4attribEyeToEyeDistanceSettingVR: 0
|
||||
ps4IncludedModules: []
|
||||
ps4attribVROutputEnabled: 0
|
||||
@ -650,7 +633,6 @@ PlayerSettings:
|
||||
additionalIl2CppArgs:
|
||||
scriptingRuntimeVersion: 1
|
||||
gcIncremental: 0
|
||||
assemblyVersionValidation: 1
|
||||
gcWBarrierValidation: 0
|
||||
apiCompatibilityLevelPerPlatform:
|
||||
Standalone: 3
|
||||
@ -701,7 +683,6 @@ PlayerSettings:
|
||||
XboxOneCapability: []
|
||||
XboxOneGameRating: {}
|
||||
XboxOneIsContentPackage: 0
|
||||
XboxOneEnhancedXboxCompatibilityMode: 0
|
||||
XboxOneEnableGPUVariability: 1
|
||||
XboxOneSockets: {}
|
||||
XboxOneSplashScreen: {fileID: 0}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user