# PositionChangedThisFrame()

> Checks if the window's position changed during the current frame.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windowing](/engine/6000.7/script-reference/unityengine/windowing.md)
* **Assembly:** UnityEngine.WindowingModule

```csharp
public bool PositionChangedThisFrame()
```

### Returns

| Type                                                          | Description                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the position changed in the current frame, false otherwise. |

### Remarks

Use this in [MonoBehaviour.Update()](/engine/6000.7/script-reference/unityengine/monobehaviour/update.md), [MonoBehaviour.FixedUpdate()](/engine/6000.7/script-reference/unityengine/monobehaviour/fixedupdate.md), or [MonoBehaviour.LateUpdate()](/engine/6000.7/script-reference/unityengine/monobehaviour/lateupdate.md) to check if the window's position changed during the current frame.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Windowing;

public class WindowingTest : MonoBehaviour
{
    GameWindow mainWindow;

    private void Awake()
    {
        mainWindow = GameWindow.Main;
    }

    private void Update()
    {
        if (mainWindow.PositionChangedThisFrame())
        {
            Debug.Log("Main window position changed: " + mainWindow.GetPosition());
        }
    }
}
```
