# GetCurrentCacheServerIp()

> Gets the IP address of the Cache Server currently in use by the Editor.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static string GetCurrentCacheServerIp()
```

### Returns

| Type                                                           | Description                                                             |
| -------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | Returns a string representation of the current Cache Server IP address. |

### Examples

```csharp
using UnityEditor;
using UnityEngine;

public class AssetDatabaseExamples : AssetPostprocessor
{
    static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
    {
        //Throw a warning in the console if Cache Server IP is not set or could not be connected to
        if(AssetDatabase.GetCurrentCacheServerIp() == "")
            Debug.LogWarning("Cache Server IP is not set!");
    }
}
```
