Skip to content

Commit fe89a10

Browse files
HamiltonHamilton
authored andcommitted
Fixed naming stuff
1 parent 16e4924 commit fe89a10

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎EGP-405 Networking Final/Assets/Multiuser Plugin/Multiuser_Editor_Window.cs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Multiuser_Editor_Window : EditorWindow
1414
//int bottomBuffer = 10, topBuffer = 10;
1515
public static bool limitAutosave = false;
1616
public Vector2 scrollPos = Vector2.zero;
17-
public string nickName;
17+
public string nickName = "";
1818
public static int clientID;
1919

2020
[MenuItem("Window/Multiuser Network")]
@@ -123,6 +123,7 @@ private void OnGUI()
123123
if (GUILayout.Button("Change to Client Setting"))
124124
{
125125
mode = 0;
126+
nickName = "Client";
126127
}
127128
EditorGUILayout.EndHorizontal();
128129

@@ -133,6 +134,7 @@ private void OnGUI()
133134
if (GUILayout.Button("Change to Server Mode"))
134135
{
135136
mode = 1;
137+
nickName = "Server";
136138
}
137139
EditorGUILayout.EndHorizontal();
138140

@@ -195,6 +197,10 @@ private void OnGUI()
195197
if (GUILayout.Button("Disconnect"))
196198
{
197199
MultiuserPlugin.Disconnect();
200+
if (mode == 0)
201+
nickName = "Client";
202+
else
203+
nickName = "Server";
198204
}
199205

200206
if (GUILayout.Button("Manual Sync"))

0 commit comments

Comments
 (0)