骑行优化
This commit is contained in:
parent
3295314b7e
commit
a73e125a49
@ -81,6 +81,7 @@ namespace Mapbox.Unity.Telemetry
|
||||
postRequest.downloadHandler = new DownloadHandlerBuffer();
|
||||
postRequest.uploadHandler = new UploadHandlerRaw(bodyRaw);
|
||||
|
||||
postRequest.uploadHandler.Dispose();
|
||||
yield return postRequest.SendWebRequest();
|
||||
|
||||
while (!postRequest.isDone) { yield return null; }
|
||||
|
||||
@ -97,14 +97,14 @@ TextureImporter:
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
|
||||
@ -424,7 +424,7 @@ MonoBehaviour:
|
||||
UserName:
|
||||
rasterOptions:
|
||||
useRetina: 0
|
||||
useCompression: 0
|
||||
useCompression: 1
|
||||
useMipMap: 0
|
||||
_terrain:
|
||||
_layerProperty:
|
||||
@ -4962,7 +4962,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1552436184
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -53,6 +53,17 @@ namespace Assets.Scripts.Scenes
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
var objAry = Resources.FindObjectsOfTypeAll<Material>();
|
||||
|
||||
for (int i = 0; i < objAry.Length; ++i)
|
||||
{
|
||||
objAry[i] = null;//解除资源的引用
|
||||
}
|
||||
var objAry2 = Resources.FindObjectsOfTypeAll<Texture>();
|
||||
for (int i = 0; i < objAry2.Length; ++i)
|
||||
{
|
||||
objAry2[i] = null;//解除资源的引用
|
||||
}
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
@ -31,6 +31,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public RouteResultParam selectParamModel;
|
||||
public RouteResult routeResult;
|
||||
|
||||
public GameObject minicamera;
|
||||
|
||||
public Dictionary<int, SeletedPlayerScript> selectPlayerDic { set; get; } = new Dictionary<int, SeletedPlayerScript>();
|
||||
|
||||
public int preticks;
|
||||
@ -195,7 +197,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
watcher = Resources.Load<GameObject>("UI/Prefab/Match/Watcher");
|
||||
target = transform.Find("Target");
|
||||
miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
|
||||
minicamera = transform.Find("MiniCamera").gameObject;
|
||||
//进入倒计时
|
||||
singleUIManager = UIObject.GetComponent<BaseUIManager>();
|
||||
TrailRenderer trail = player.GetComponent<TrailRenderer>();
|
||||
@ -377,17 +379,23 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//加载人物和地图以及UI界面
|
||||
private void InitGameObject()
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
minicamera.SetActive(true);
|
||||
miniMap.SetActive(true);
|
||||
#endif
|
||||
map.gameObject.SetActive(true);
|
||||
player.SetActive(true);
|
||||
UIObject.SetActive(true);
|
||||
singleUIManager = UIObject.AddComponent<SingleUIManager>();
|
||||
miniMap.SetActive(true);
|
||||
map.OnTileFinished += Map_OnTileFinished;
|
||||
mapPos = map.transform.position;
|
||||
}
|
||||
|
||||
private void InitRaceGameObject()
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
minicamera.SetActive(true);
|
||||
#endif
|
||||
map.gameObject.SetActive(true);
|
||||
player.SetActive(true);
|
||||
UIObject.SetActive(true);
|
||||
|
||||
@ -142,7 +142,7 @@ public class DeviceView : MonoBehaviour
|
||||
}));
|
||||
|
||||
UIManager.AddEvent(connectionButton.gameObject, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e => {
|
||||
if (!mPairButton.activeSelf)
|
||||
if (!connectionPanel.activeSelf)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1072,6 +1072,8 @@ public class UIManager : MonoBehaviour
|
||||
private void OnDestroy()
|
||||
{
|
||||
UIManager.Instance = null;
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
}
|
||||
public static void SwitchAccount()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user