# ScrollViewScope

> Create a new ScrollViewScope and begin the corresponding ScrollView.

## Definition

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

## ScrollViewScope(Vector2, GUILayoutOption\[])

Create a new ScrollViewScope and begin the corresponding ScrollView.

```csharp
public ScrollViewScope(Vector2 scrollPosition, params GUILayoutOption[] options)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The scroll position to use.**** (\[GUILayoutOption\[]]\(/engine/6000.5/script-reference/unityengine/guilayoutoption)):&#x20;

## ScrollViewScope(Vector2, bool, bool, GUILayoutOption\[])

Create a new ScrollViewScope and begin the corresponding ScrollView.

```csharp
public ScrollViewScope(Vector2 scrollPosition, bool alwaysShowHorizontal, bool alwaysShowVertical, params GUILayoutOption[] options)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The scroll position to use.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to always show the horizontal scrollbar. If false, it is only shown when the content inside the ScrollView is wider than the scrollview itself.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to always show the vertical scrollbar. If false, it is only shown when the content inside the ScrollView is higher than the scrollview itself.**** (\[GUILayoutOption\[]]\(/engine/6000.5/script-reference/unityengine/guilayoutoption)):&#x20;

## ScrollViewScope(Vector2, GUIStyle, GUIStyle, GUILayoutOption\[])

Create a new ScrollViewScope and begin the corresponding ScrollView.

```csharp
public ScrollViewScope(Vector2 scrollPosition, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, params GUILayoutOption[] options)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The scroll position to use.**** (\[GUIStyle]\(/engine/6000.5/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.5/script-reference/unityengine/guistyle.md) to use for the horizontal scrollbar. If left out, the `horizontalScrollbar` style from the current [GUISkin](/engine/6000.5/script-reference/unityengine/guiskin.md) is used.**** (\[GUIStyle]\(/engine/6000.5/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.5/script-reference/unityengine/guistyle.md) to use for the vertical scrollbar. If left out, the `verticalScrollbar` style from the current [GUISkin](/engine/6000.5/script-reference/unityengine/guiskin.md) is used.**** (\[GUILayoutOption\[]]\(/engine/6000.5/script-reference/unityengine/guilayoutoption)):&#x20;

## ScrollViewScope(Vector2, GUIStyle, GUILayoutOption\[])

Create a new ScrollViewScope and begin the corresponding ScrollView.

```csharp
public ScrollViewScope(Vector2 scrollPosition, GUIStyle style, params GUILayoutOption[] options)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The scroll position to use.**** (\[GUIStyle]\(/engine/6000.5/script-reference/unityengine/guistyle)): **** (\[GUILayoutOption\[]]\(/engine/6000.5/script-reference/unityengine/guilayoutoption)):&#x20;

## ScrollViewScope(Vector2, bool, bool, GUIStyle, GUIStyle, GUIStyle, GUILayoutOption\[])

Create a new ScrollViewScope and begin the corresponding ScrollView.

```csharp
public ScrollViewScope(Vector2 scrollPosition, bool alwaysShowHorizontal, bool alwaysShowVertical, GUIStyle horizontalScrollbar, GUIStyle verticalScrollbar, GUIStyle background, params GUILayoutOption[] options)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The scroll position to use.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to always show the horizontal scrollbar. If false, it is only shown when the content inside the ScrollView is wider than the scrollview itself.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to always show the vertical scrollbar. If false, it is only shown when the content inside the ScrollView is higher than the scrollview itself.**** (\[GUIStyle]\(/engine/6000.5/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.5/script-reference/unityengine/guistyle.md) to use for the horizontal scrollbar. If left out, the `horizontalScrollbar` style from the current [GUISkin](/engine/6000.5/script-reference/unityengine/guiskin.md) is used.**** (\[GUIStyle]\(/engine/6000.5/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.5/script-reference/unityengine/guistyle.md) to use for the vertical scrollbar. If left out, the `verticalScrollbar` style from the current [GUISkin](/engine/6000.5/script-reference/unityengine/guiskin.md) is used.**** (\[GUIStyle]\(/engine/6000.5/script-reference/unityengine/guistyle)): **** (\[GUILayoutOption\[]]\(/engine/6000.5/script-reference/unityengine/guilayoutoption)):&#x20;
