# ChangeKind

> Categories of change that can be reported on a graph or state machine element.

## Definition

* **Type:** Enum
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
[Flags]
public enum ChangeKind
```

## Remarks

[ChangeKind](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind.md) is a bit-flag enum, so a single value can describe multiple categories of change at once. Combine values with `|` and test them with `&` or HasFlag.

A value of [ChangeKind.None](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/none.md) means no change categories are set.

Combine flags with the bitwise-or operator, and test them with bitwise-and or HasFlag:

## Examples

```csharp
ChangeKind kinds = ChangeKind.Added | ChangeKind.Data;

if ((kinds & ChangeKind.Added) != 0) { /* newly added */ }
if (kinds.HasFlag(ChangeKind.Data)) { /* data changed */ }
```

## Fields

| Value                                                                                                | Description                                                                                                                                                        |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Added](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/added.md)               | The element was added to the graph or state machine.                                                                                                               |
| [Data](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/data.md)                 | Model data (for example, an inspectable field) changed.                                                                                                            |
| [Grouping](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/grouping.md)         | Grouping of variables in the blackboard changed.                                                                                                                   |
| [Layout](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/layout.md)             | The position or dimension of the element changed.                                                                                                                  |
| [None](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/none.md)                 | No change categories.                                                                                                                                              |
| [PortChanged](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/portchanged.md)   | A port on the node changed; inspect [ChangedNode.ChangedPorts](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changednode/changedports.md) for details. |
| [RecreateView](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/recreateview.md) | The view for the element must be torn down and recreated (for example, a variable node flipped between Get and Set).                                               |
| [Removed](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/removed.md)           | The element was removed from the graph or state machine.                                                                                                           |
| [Style](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/style.md)               | The visual style (color, etc.) of the element changed.                                                                                                             |
| [Topology](/engine/6000.7/script-reference/unity/graphtoolkit/editor/changekind/topology.md)         | Graph or state machine topology changed; typically, a wire or transition was connected or disconnected.                                                            |
