> For the complete documentation index, see [llms.txt](https://docs.wepin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wepin.io/en/deprecated/unity-sdk/method.md).

# Methods

The following shows the methods provided by the Wepin Unity SDK.

## `openWidget`

The <mark style="color:blue;">`openWidget`</mark> method shows the widget window.

### Example

```csharp
_wepin.openWidget();
```

## `closeWidget`

The <mark style="color:blue;">`closeWidget`</mark> method closes the widget window.

### Example

```csharp
_wepin.closeWidget();
```

## `getAccounts`

The <mark style="color:blue;">`getAccounts`</mark> method returns user accounts of the networks available in the app. <mark style="color:blue;">`getAccounts`</mark> is a method available after widget login.

```csharp
AccountList accountList = _wepin.GetAccounts();
```

### \<WepinSDK.Types.AccountList>

It is the returned value of the <mark style="color:blue;">`getAccounts`</mark>. If a user is logged in, it returns a list of <mark style="color:blue;">`account`</mark>.

* **`account`** <*WepinSDK.Types.Accounts*>
  * **`address`** <*string*>\
    The account address
  * **`network`** <*string*>

    The blockchain network of the account. The name of each network can be found below.

{% content-ref url="/pages/jNG611rZkq69C8zZKglh" %}
[Broken mention](broken://pages/jNG611rZkq69C8zZKglh)
{% endcontent-ref %}

### Example

```json
[
  {
    address: '0x0000001111112222223333334444445555556666',
    network: 'Ethereum',
  },
]
```

## finalize

The <mark style="color:blue;">`finalize()`</mark> method finalizes the Wepin SDK.

### Example

```csharp
_wepin.finalize();
```
