添加Manager的时候初始化DOTween
切换场景的时候clear了
| | |
| | | using UnityEngine.Networking; |
| | | using Protobuf; |
| | | using Google.Protobuf; |
| | | using DG.Tweening; |
| | | |
| | | public class LoginUI : MonoBehaviour |
| | | { |
| | |
| | | |
| | | if (!GameConfig.isFirstStart)//后续直接加载 |
| | | { |
| | | waitTime = 2f; |
| | | |
| | | OnClickLoginBtn(); |
| | | } |
| | | else |
| | | { |
| | | waitTime = 0f; |
| | | //第一次启动,初始化并且埋点 |
| | | TDAA_SDKManager.Ins.SDKInit(ChannelID.Gm.ToString()); |
| | | TDAA_SDKManager.Ins.Statistics(1);//成功加载登陆界面的人数 |
| | | } |
| | | } |
| | | |
| | | float waitTime; |
| | | |
| | | // private void OnEnable() |
| | | // { |
| | |
| | | |
| | | IEnumerator loginMy() |
| | | { |
| | | progressSlider.value = 0.0f; |
| | | System.GC.Collect(); |
| | | DOTween.Clear(); |
| | | Debug.Log("开始清理GC,清理DOTween"); |
| | | yield return new WaitForSeconds(waitTime); |
| | | int displayProgress = 0; |
| | | int toProgress = 0; |
| | | AsyncOperation op = SceneManager.LoadSceneAsync("Endless2D"); |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Core.Utilities; |
| | | using DG.Tweening; |
| | | using Protobuf; |
| | | using UnityEngine; |
| | | |
| | |
| | | GameObject root = GameObject.Find("ManagerRoot"); |
| | | if (root == null) |
| | | { |
| | | DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10); |
| | | |
| | | root = new GameObject("ManagerRoot"); |
| | | root.AddComponent<DoNotDestory>(); |
| | | root.AddComponent<MasterSocket>(); |
| | |
| | | base.Awake(); |
| | | |
| | | randomTowerBtn = transform.Find("BottomCanvas/Panel/TowerBuyBtn").GetComponent<Button>(); |
| | | DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10); |
| | | //DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10); |
| | | |
| | | state = State.Normal; |
| | | m_Camera = GameObject.Find("SceneCamera3D").GetComponent<Camera>(); |