# IsDirty

> Gets a boolean value that indicates whether the specified object has changed since the last time it was saved.

## Definition

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

## IsDirty(int)

Gets a boolean value that indicates whether the specified object has changed since the last time it was saved.

```csharp
public static bool IsDirty(int instanceID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The object's instance ID.

### Returns

| Type                                                          | Description                                      |
| ------------------------------------------------------------- | ------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the object has changed; otherwise false. |

### Remarks

Additional Resources: [EditorUtility.GetDirtyCount](/engine/6000.0/script-reference/unityeditor/editorutility/getdirtycount.md), [EditorUtility.SetDirty](/engine/6000.0/script-reference/unityeditor/editorutility/setdirty.md).

## IsDirty(Object)

Gets a boolean value that indicates whether the specified object has changed since the last time it was saved.

```csharp
public static bool IsDirty(Object target)
```

### Parameters

**** (\[Object]\(/engine/6000.0/script-reference/unityengine/object)): The object.

### Returns

| Type                                                          | Description                                      |
| ------------------------------------------------------------- | ------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the object has changed; otherwise false. |

### Remarks

Additional Resources: [EditorUtility.GetDirtyCount](/engine/6000.0/script-reference/unityeditor/editorutility/getdirtycount.md), [EditorUtility.SetDirty](/engine/6000.0/script-reference/unityeditor/editorutility/setdirty.md).
