> For the complete documentation index, see [llms.txt](https://docs.coherence.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherence.io/0.9/api-reference/network-sdk/worlds.md).

# Worlds

## Worlds API

Worlds functionality can also be accessed through the `PlayResolver` just like rooms. Worlds work a differently however and are a bit simpler.

#### Worlds

First we need to fetch the available Worlds. Unlike Rooms, Worlds cannot be created by a Client and need to be setup in the Developer Portal.

```csharp
async Task<(IReadOnlyList<WorldData>, bool)> FetchWorlds()
```

`FetchWorlds` in `PlayResolver.cs` allows us to fetch the available Worlds for our project. This task returns a list of Worlds in the form of `WorldsData` objects and a boolean that indicates if the operation was successful.

{% hint style="info" %}
This method also calls `EnsurePlayConnection` which initializes the needed mechanisms in the`PlayResolver` if necessary. `EnsurePlayConnection` can also be called directly for initialization.
{% endhint %}

```csharp
async Task<WorldData> FetchLocalWorld()
```

`FetchLocalWorld` in `PlayResolver.cs` returns the local World for a local running World Server.

The `WorldsConnectDialog` populates a dropdown with the Worlds returned by both of these methods so we can select a World.

After we've selected a World we can connect to it using:

```csharp
void JoinWorld(IClient client, WorldData data, bool isSimulator = false)
```

`JoinWorld` in `PlayResolver.cs` connects the Client that we pass to the method to the World we pass to the method.

The `isSimulator` optional parameter is used for Simulators and can be ignored for regular Client connections (see [Simulators](/0.9/simulators/simulators-overview.md)).

The `WorldsConnectDialog` is an example implementation for Worlds usage.

{% hint style="info" %}
When connected to a Room or a World, the Client can access the currently connected endpoint by accessing the `Coherence.IClient.LastEndpointData` property of the `CoherenceMonoBridge,` e.g. `myBridge.Client.LastEndpointData`.
{% endhint %}
