Ejemplo n.º 1
0
        void AddLastConnectedIP(GenericMenu menuOptions, ref bool hasOpenConnection)
        {
            string lastIP = AttachToPlayerPlayerIPWindow.GetLastIPString();

            if (string.IsNullOrEmpty(lastIP))
            {
                return;
            }

            bool isConnected = ProfilerDriver.connectedProfiler == PLAYER_DIRECT_IP_CONNECT_GUID;

            hasOpenConnection |= isConnected;
            menuOptions.AddItem(new GUIContent(lastIP), isConnected, () => DirectIPConnect(lastIP));
        }
Ejemplo n.º 2
0
        void AddLastConnectedIP(ConnectionTreeViewWindow menuOptions, ref bool hasOpenConnection)
        {
            string lastIP = AttachToPlayerPlayerIPWindow.GetLastIPString();

            if (string.IsNullOrEmpty(lastIP))
            {
                return;
            }

            bool isConnected = ProfilerDriver.connectedProfiler == PLAYER_DIRECT_IP_CONNECT_GUID;

            hasOpenConnection |= isConnected;
            menuOptions.AddItem(new ConnectionDropDownItem(lastIP, PLAYER_DIRECT_IP_CONNECT_GUID,
                                                           Content.DirectConnection, ConnectionDropDownItem.ConnectionMajorGroup.Direct, () => ProfilerDriver.connectedProfiler == PLAYER_DIRECT_IP_CONNECT_GUID,
                                                           () => DirectIPConnect(lastIP)));
        }