Ejemplo n.º 1
0
        //set the panel UI on/off
        public static void SetUIPanelEnabled(string _panel, bool _enabled)
        {
            DebugBox temp = null;

            if (PanelExistTest(FindUIPanel(_panel, true), "Toggle UI", out temp))
            {
                temp.SetGUIEnabled(_enabled);
            }
        }
Ejemplo n.º 2
0
        //create debug box
        internal static DebugBox CreateUIPanel(Rect _rect, string _panel = "Default", bool _writeToDisk = true, bool _enabledOnCreation = false)
        {
            //check if master object is needed
            SetupObject();

            //create an object and add DebugBox component to it
            GameObject DebugObj = new GameObject("DebugObj");

            GameObject.DontDestroyOnLoad(DebugObj);
            DebugObj.transform.parent = m_obj.transform;

            DebugBox ret = DebugObj.AddComponent <DebugBox>(new DebugBox(_panel, _rect, 100, m_currentGUIID++, _writeToDisk));

            ret.SetGUIEnabled(_enabledOnCreation);

            //add panel then return
            m_debugPanels.Add(_panel, ret);
            return(ret);
        }