去掉ping和單點登錄前端

This commit is contained in:
CaiYanPeng 2021-11-12 16:54:55 +08:00
parent d754ff3b15
commit 492040d382
5 changed files with 48 additions and 44 deletions

View File

@ -10,7 +10,7 @@ using System.Linq;
using Assets.Scenes.Ride.Scripts;
[HelpURL("https://docs.microsoft.com/en-us/appcenter/sdk/crashes/unity")]
public class AppCenterBehavior : MonoSingleton<AppCenterBehavior>
public class AppCenterBehavior : MonoBehaviour
{
public static event Action InitializingServices;
public static event Action InitializedAppCenterAndServices;
@ -25,8 +25,8 @@ public class AppCenterBehavior : MonoSingleton<AppCenterBehavior>
// Make sure that App Center have only one instance.
if (_instance != null)
{
//Debug.LogError("App Center Behavior should have only one instance!");
//DestroyImmediate(gameObject);
Debug.LogError("App Center Behavior should have only one instance!");
DestroyImmediate(gameObject);
return;
}
_instance = this;

View File

@ -158,7 +158,7 @@ PrefabInstance:
- target: {fileID: 545917028276686471, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 40
objectReference: {fileID: 0}
- target: {fileID: 545917028276686471, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -204,7 +204,7 @@ PrefabInstance:
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -214,7 +214,7 @@ PrefabInstance:
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -264,12 +264,12 @@ PrefabInstance:
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 172
objectReference: {fileID: 0}
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32
objectReference: {fileID: 0}
- target: {fileID: 3150550772099312288, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -291,15 +291,20 @@ PrefabInstance:
propertyPath: m_Name
value: Delay
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
- target: {fileID: 3150550772099312289, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -309,7 +314,7 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -9
objectReference: {fileID: 0}
- target: {fileID: 8688565590564084001, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -505,12 +510,12 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -520,7 +525,7 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -9
objectReference: {fileID: 0}
- target: {fileID: 8688565590564084001, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -686,12 +691,12 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -701,7 +706,7 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -9
objectReference: {fileID: 0}
- target: {fileID: 8688565590564084001, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -892,12 +897,12 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -912,7 +917,7 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -2
objectReference: {fileID: 0}
- target: {fileID: 8688565590564084001, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -1078,12 +1083,12 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -1093,7 +1098,7 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -9
objectReference: {fileID: 0}
- target: {fileID: 8688565590564084001, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}

View File

@ -29,13 +29,12 @@ namespace Assets.Scripts.Apis
}
//protected static EasyHttp.Http.HttpClient http;
private static System.Net.Http.HttpClient httpClient;
private static PfHttpClientHandler httpClientHandler;
private static HttpClientHandler httpClientHandler;
static ApiBase()
{
//http = new EasyHttp.Http.HttpClient();
//http.Request.PersistCookies = true;
httpClientHandler = new PfHttpClientHandler();
httpClientHandler = new HttpClientHandler();
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
httpClientHandler.Proxy = WebRequest.GetSystemWebProxy();
httpClientHandler.CookieContainer = _cookieCollection;

View File

@ -17,8 +17,8 @@ namespace Assets.Scripts.Scenes
{
Debug.Log("base scene awake");
Application.logMessageReceived += Application_logMessageReceived;
StopCoroutine("Ping");
StartCoroutine(Ping());
//StopCoroutine("Ping");
//StartCoroutine(Ping());
}
private IEnumerator Ping()
@ -64,19 +64,19 @@ namespace Assets.Scripts.Scenes
}
protected virtual void Update()
{
if (Application.internetReachability == NetworkReachability.NotReachable)
{
isNetWorkLose = true;
App.delayTime = -1;
}
else if (null != ping && ping.isDone)
{
isNetWorkLose = false;
App.delayTime = ping.time;
Debug.Log(App.delayTime);
ping.DestroyPing();
ping = null;
}
//if (Application.internetReachability == NetworkReachability.NotReachable)
//{
// isNetWorkLose = true;
// App.delayTime = -1;
//}
//else if (null != ping && ping.isDone)
//{
// isNetWorkLose = false;
// App.delayTime = ping.time;
// Debug.Log(App.delayTime);
// ping.DestroyPing();
// ping = null;
//}
}
}
}

View File

@ -6,8 +6,8 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/Login-Mobile.unity
guid: 4be878da00cf764499988cf403faf94d
path: Assets/Scenes/Login.unity
guid: 6dce3e17997730b4492f91dd8fede429
- enabled: 1
path: Assets/Scenes/MainScene.unity
guid: ab586a3c1bacd4a48a55178eb06fe0cc