Beispiel #1
0
 private void OnGUIFooter()
 {
     using (new EditorGUIUtility.IconSizeScope(s_IconSize))
     {
         if (AssetDatabaseExperimental.IsCacheServerEnabled())
         {
             // Bad IP:Port. Direct the user to fix in Project Preferences.
             if (!AssetDatabaseExperimental.CanConnectToCacheServer(AssetDatabaseExperimental.GetCacheServerAddress(), AssetDatabaseExperimental.GetCacheServerPort()))
             {
                 if (GUILayout.Button(m_CacheCannotConnectButtonContent, GUILayout.Width(k_ConnectionButtonWidth), GUILayout.Height(k_ConnectionButtonHeight)))
                 {
                     OpenProjectSettings();
                 }
             }
             // Give the option to 'reconnect' as the user may have changed the IP or Port within Project Preferences.
             else
             {
                 if (GUILayout.Button(m_CacheCanReconnectButtonContent, GUILayout.Width(k_ConnectionButtonWidth), GUILayout.Height(k_ConnectionButtonHeight)))
                 {
                     AssetDatabaseExperimental.RefreshSettings();
                 }
             }
         }
         else
         {
             if (GUILayout.Button(m_CacheDisabledButtonContent, GUILayout.Width(k_ConnectionButtonWidth), GUILayout.Height(k_ConnectionButtonHeight)))
             {
                 OpenProjectSettings();
             }
         }
     }
 }