# UnregisterLayoutChangedCallback(Action<DisplayLayoutChangedEventArgs>)

> Removes a callback that was registered with DisplayInfo.RegisterLayoutChangedCallback.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static bool UnregisterLayoutChangedCallback(Action<DisplayLayoutChangedEventArgs> callback)
```

### Parameters

**** (\[Action\<DisplayLayoutChangedEventArgs>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback to remove from the display layout changed notification list. If `callback` is null, Unity throws an `ArgumentNullException`.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if the callback was registered and has been removed, otherwise false. |

### Remarks

This method is supported only in Linux, Embedded Linux and QNX players. In the Editor and on other platforms it throws a `NotSupportedException`.

### Examples

```csharp
using System.Collections.Generic;
using UnityEngine;

public class DisplayLayoutWatcher : MonoBehaviour
{
    private List<DisplayInfo> displays = new List<DisplayInfo>();

    void OnEnable()
    {
        DisplayInfo.RegisterLayoutChangedCallback(OnDisplayLayoutChanged);
    }

    void OnDisable()
    {
        DisplayInfo.UnregisterLayoutChangedCallback(OnDisplayLayoutChanged);
    }

    void OnDisplayLayoutChanged(DisplayLayoutChangedEventArgs args)
    {
        DisplayInfo.GetLayout(displays);
        Debug.Log("Display layout changed. Display count: " + displays.Count);
    }
}
```
