# OnViewLODChanged(float)

> Called when the graph view's zoom level changes.

## Definition

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

```csharp
public virtual void OnViewLODChanged(float zoom)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The new zoom level, equal to the horizontal scale of the graph view's content. A value of 1 represents 100% zoom; values below 1 represent zoomed-out views.

### Remarks

Fires whenever the graph view's zoom changes, and also once for the initial zoom when the view is first built. Override this to swap custom UI for a representation appropriate to the current level of detail (LOD), such as hiding fine details or replacing text with icons when the graph is zoomed out.

### Examples

```csharp
public override void OnViewLODChanged(float zoom)
{
    // Hide detailed UI when zoomed out below 50%.
    m_DetailsContainer.style.display = zoom < 0.5f
        ? DisplayStyle.None
        : DisplayStyle.Flex;
}
```
