From 69e0fea6c92fd4e153d45e5f26ef89baecf0405a Mon Sep 17 00:00:00 2001 From: weixudong <weixudong4700@ktgame.com> Date: Thu, 19 Nov 2020 08:51:09 +0800 Subject: [PATCH] Merge branch 'master' of ssh://172.16.1.52:8091/GemBattle into master --- Assets/Scripts/Manager/ManagerRoot.cs | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Manager/ManagerRoot.cs b/Assets/Scripts/Manager/ManagerRoot.cs index 42bcdb4..00e780c 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; @@ -9,16 +11,22 @@ 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"); + root.AddComponent<DoNotDestory>(); + root.AddComponent<MasterSocket>(); + root.AddComponent<TDAA_SDKManager>(); + root.AddComponent<AudioSourceManager>(); + + // root.AddComponent<ErrorLogOnGUIMyTools>(); + } + //gameObject.AddComponent<JsonDataReader>(); } -- Gitblit v1.9.1