Skip to content

Commit f5a91a0

Browse files
committed
check for empty url in configEditor advanced mode
1 parent db040b7 commit f5a91a0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Scripts/Editor/ConfigEditor.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,15 @@ private void OnGUI()
349349

350350
info.m_URL = EditorGUILayout.TextField("URL", info.m_URL);
351351

352-
if(info.m_URL.StartsWith("https://gateway-a"))
353-
info.m_Apikey = EditorGUILayout.TextField("API Key", info.m_Apikey);
354-
else
352+
if(!string.IsNullOrEmpty(info.m_URL))
355353
{
356-
info.m_User = EditorGUILayout.TextField("User", info.m_User);
357-
info.m_Password = EditorGUILayout.TextField("Password", info.m_Password);
354+
if(info.m_URL.StartsWith("https://gateway-a"))
355+
info.m_Apikey = EditorGUILayout.TextField("API Key", info.m_Apikey);
356+
else
357+
{
358+
info.m_User = EditorGUILayout.TextField("User", info.m_User);
359+
info.m_Password = EditorGUILayout.TextField("Password", info.m_Password);
360+
}
358361
}
359362

360363
if (GUILayout.Button("Delete"))

0 commit comments

Comments
 (0)