# OnGraphChanged(GraphLogger)

> Called after the graph has changed.

## Definition

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

```csharp
public virtual void OnGraphChanged(GraphLogger graphLogger)
```

### Parameters

**** (\[GraphLogger]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphlogger)): The [GraphLogger](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphlogger.md) that receives any errors or warnings related to the graph, and provides access to information about what changed (added/deleted/modified nodes).

### Remarks

Unity calls this method after any change to the graph. Override it to validate the graph's integrity, log issues using the provided [GraphLogger](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphlogger.md), or react to specific changes via [GraphLogger.GraphChanges](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphlogger/graphchanges.md).

Use this method to detect invalid configurations, highlight issues in the editor, or provide user feedback. You can iterate the changed nodes efficiently without checking all nodes in the graph.

Do not modify the graph within this method, as it may cause instability or recursive updates.
