Ejemplo n.º 1
0
        private void OnEnable()
        {
            m_RefreshTexture = new GUIContent(EditorGUIUtility.FindTexture("Refresh"), "Refresh shader from file");
            m_SaveTexture    = new GUIContent(EditorGUIUtility.FindTexture("SaveAs"), "save shader variants to file");

            if (m_Panel == null)
            {
                m_Panel = new TianGlyphPanel();
            }
            m_Panel.OnEnable(this);

            if (m_TabPanels == null)
            {
                m_TabPanels    = new IRemoteDebugPanel[3];
                m_TabPanels[0] = new HierarchyPanel(this);
                m_TabPanels[1] = new PatchPanel(this);
                m_TabPanels[2] = new LogPanel(this);
                foreach (var panel in m_TabPanels)
                {
                    panel.OnEnable();
                }
            }
            SwitchPanel();

            Debug.LogError("OnEnable:" + XNetUtil.GetLocalIP());
            server?.Close();
            server = new RemoteDebugServer(k_IP, RemoteDebugConfig.port);
            server.Start();
        }
 protected override void OnInit()
 {
     m_Client      = new XSocket();
     m_Client.Name = "Client";
     m_Client.OnConnectCallback = OnConnect;
     m_Client.OnReceiveCallback = OnReceive;
     m_Client.OnCloseCallback   = OnClose;
     m_LocalIP = XNetUtil.GetLocalIP();
 }