Beispiel #1
0
    private void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }

        if (_instance != this)
        {
            DestroyImmediate(gameObject);
        }

        if (FindObjectOfType <AnalyticsManager>() == null)
        {
            new GameObject("GA").AddComponent <AnalyticsManager>();
        }

        if (FindObjectOfType <ROSAgentManager>() == null)
        {
            GameObject clone = GameObject.Instantiate(Resources.Load("Managers/ROSAgentManager", typeof(GameObject))) as GameObject;
            clone.GetComponent <ROSAgentManager>().currentMode = StartModeTypes.Menu;
            clone.name = "ROSAgentManager";
        }

        StaticConfigManager scM = FindObjectOfType <StaticConfigManager>();

        if (scM != null)
        {
            scM.UnloadStaticConfigBundles();
            Destroy(scM.gameObject);
        }
    }
Beispiel #2
0
    private void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }

        if (_instance != this)
        {
            DestroyImmediate(gameObject);
        }
        else
        {
            DontDestroyOnLoad(gameObject);
        }
    }
    private void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }

        if (_instance != this)
        {
            DestroyImmediate(gameObject);
        }
        else
        {
            DontDestroyOnLoad(gameObject);
        }

        if (FindObjectOfType <AnalyticsManager>() == null)
        {
            new GameObject("GA").AddComponent <AnalyticsManager>();
        }
    }