示例#1
0
        public static void Show(Rect buttonScreenRect)
        {
            Rect rect = new Rect(buttonScreenRect.x, buttonScreenRect.yMax, 300, 50);
            AttachToPlayerPlayerIPWindow w = EditorWindow.GetWindowWithRect <AttachToPlayerPlayerIPWindow>(rect, true, Content.EnterPlayerIPWindowName);

            w.position = rect;
            w.m_Parent.window.m_DontSaveToLayout = true;
        }
示例#2
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));
        }
示例#3
0
 void AddConnectionViaEnterIPWindow(GenericMenu menuOptions, Rect buttonScreenRect)
 {
     menuOptions.AddItem(Content.EnterIPText, false, () => AttachToPlayerPlayerIPWindow.Show(buttonScreenRect));
 }