# FrameSelected

> Frame the object selection in the Scene view.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## FrameSelected()

Frame the object selection in the Scene view.

```csharp
public bool FrameSelected()
```

### Returns

| Type                                                          | Description                                                                            |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the current selection fits in the Scene view. Returns false otherwise. |

## FrameSelected(bool)

Frame the object selection in the Scene view.

```csharp
public bool FrameSelected(bool lockView)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the view should be locked to the selection.

### Returns

| Type                                                          | Description                                                                            |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the current selection fits in the Scene view. Returns false otherwise. |

## FrameSelected(bool, bool)

Frame the object selection in the Scene view.

```csharp
public virtual bool FrameSelected(bool lockView, bool instant)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the view should be locked to the selection.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

### Returns

| Type                                                          | Description                                                                            |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the current selection fits in the Scene view. Returns false otherwise. |
