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)); }
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))); }