# Loading a Web

## Getting the Web View

The first step to loading a web is finding a [web-view-ugui](https://stylishesper.gitbook.io/skill-web/editors/components/ugui/web-view-ugui "mention") component that can load it.

### Active

You can get the active web view with `WebViewUGUI.Active`.&#x20;

```csharp
WebViewUGUI myWebView = WebViewUGUI.Active;
```

If you have multiple web view components in your scene that the player can switch through, you can set the active one with the `SetActive` method. You will need the reference to the specific `WebViewUGUI` component.

```csharp
myOtherWebView.SetActive();
```

### Find

Alternatively, you can find a specific web view with the name of the web graph that it's meant for (the "Web Name" field set from the inspector).

```csharp
WebViewUGUI myWebView = WebViewUGUI.Find("My Web Name");
```

## Load/Unload

To load a web in the UI, you have to use the [web-view-ugui](https://stylishesper.gitbook.io/skill-web/editors/components/ugui/web-view-ugui "mention") component. Ensure there's an instance of one in your scene.

If you have a reference to a [web](https://stylishesper.gitbook.io/skill-web/scripting/api/graph/web "mention"), you can use the `Load` method. This will create the UI for a specific web. If a previous web is loaded, it will be unloaded.

```csharp
myWebView.Load(myWeb);
```

You can unload the loaded web (remove its UI) with the `Unload` method.

```csharp
myWebView.Unload();
```
