Exemplo n.º 1
0
        public static void UpdateGUI()
        {
            if (!isGameLoaded)
            {
                return;
            }

            if (!hideGUI && m_mainPanel == null)
            {
                // Creating GUI
                m_mainPanel = UIView.GetAView().AddUIComponent(typeof(GUI.UIMainPanel)) as GUI.UIMainPanel;
            }
            else if (hideGUI && m_mainPanel != null)
            {
                GameObject.Destroy(m_mainPanel.gameObject);
                m_mainPanel = null;
            }
        }
Exemplo n.º 2
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.º 3
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);
            }
        }