From f453404715d4e4951d46856578de068b75fe0f34 Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Fri, 11 Dec 2020 20:20:42 +0800
Subject: [PATCH] Merge commit '4b116e3d552fd8b317be611cd7aee2c091317d9f' into master

---
 Assets/Scripts/Manager/ManagerRoot.cs |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/Assets/Scripts/Manager/ManagerRoot.cs b/Assets/Scripts/Manager/ManagerRoot.cs
index a020d44..4fc9ff8 100644
--- a/Assets/Scripts/Manager/ManagerRoot.cs
+++ b/Assets/Scripts/Manager/ManagerRoot.cs
@@ -1,6 +1,8 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using Core.Utilities;
+using DG.Tweening;
 using Protobuf;
 using UnityEngine;
 
@@ -8,24 +10,26 @@
 {
     public class ManagerRoot : MonoBehaviour
     {
-
-        //private bool canChangeScene = false;
-
-        public void Awake()
+        void Awake()
         {
-            gameObject.AddComponent<DoNotDestory>();
-            gameObject.AddComponent<MasterSocket>();
-            gameObject.AddComponent<TDAA_SDKManager>();
-            gameObject.AddComponent<AudioSourceManager>();
+            GameObject root = GameObject.Find("ManagerRoot");
+            if (root == null)
+            {
+                DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10);
 
-            //gameObject.AddComponent<ErrorLogOnGUIMyTools>();
+                root = new GameObject("ManagerRoot");
+                // if (GameConfig.useSDK)
+                //     root.AddComponent<SDKCallBack>();
+                root.AddComponent<DoNotDestory>();
+                root.AddComponent<MasterSocket>();
+                root.AddComponent<TDAA_SDKManager>();
+                root.AddComponent<AudioSourceManager>();
+                root.AddComponent<JsonDataReader>();
+                root.AddComponent<JsonDataInit>();
+                root.AddComponent<ErrorLogOnGUIMyTools>();
+            }
+
             //gameObject.AddComponent<JsonDataReader>();
-
-        }
-
-        void Start()
-        {
-            AudioSourceManager.Ins.Play(AudioEnum.BGM1);
         }
 
         // public void AfterRead()

--
Gitblit v1.9.1