Exemplo n.º 1
0
        public void Start()
        {
            try
            {
                // Loading config
                AdvancedVehicleOptions.LoadConfig();
                AdvancedVehicleOptions.CheckAllServicesValidity();

                m_mainPanel = GameObject.FindObjectOfType <GUI.UIMainPanel>();
                if (m_mainPanel == null && !hideGUI)
                {
                    m_mainPanel = UIView.GetAView().AddUIComponent(typeof(GUI.UIMainPanel)) as GUI.UIMainPanel;
                }
            }
            catch (Exception e)
            {
                DebugUtils.Log("UI initialization failed.");
                DebugUtils.LogException(e);

                GameObject.Destroy(gameObject);
            }
        }
Exemplo n.º 2
0
        public void Start()
        {
            try
            {
                // Loading config
                AdvancedVehicleOptions.InitConfig();

                if (AdvancedVehicleOptions.onLoadCheck)
                {
                    AdvancedVehicleOptions.CheckAllServicesValidity();
                }

                m_mainPanel = GameObject.FindObjectOfType <GUI.UIMainPanel>();
                UpdateGUI();
            }
            catch (Exception e)
            {
                DebugUtils.Log("UI initialization failed.");
                DebugUtils.LogException(e);

                GameObject.Destroy(gameObject);
            }
        }