> For the complete documentation index, see [llms.txt](https://espergames.gitbook.io/skill-web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://espergames.gitbook.io/skill-web/scripting/player-web-link.md). Agents can also search and read this documentation through its [MCP server](https://espergames.gitbook.io/skill-web/~gitbook/mcp).

# Player Web Link

Working with the Player Web Link component.

## Notes

* All properties visible in the component inspector can be set through code.

## Linking

While linking can occur automatically through the inspector options, you can link to a `Web` with the `Link` method. You will need a reference to a `Web`.

```csharp
myPlayerWebLink.Link(myWeb);
```

## Obtained Skills

Use the `myPlayerWebLink.obtainedSkills` list field to access all obtained skill or use the `GetAllObtainedSkills` method.

```csharp
List<SkillNode> allSkills = myPlayerWebLink.GetAllObtainedSkills();
```

You can check if a specific skill is obtained by its ID (`int`) or name (`string`).

```csharp
bool isObtained = myPlayerWebLink.IsObtained("My Skill");
```

## Any Skill

To get a **list of all identical skills**, use `GetSkillNodes` and pass either an ID (`int`) or name (`string`).

{% hint style="info" %}
Note that webs can have any number of the same skill, which is why one ID or name can result in multiple returned skills.
{% endhint %}

```csharp
List<SkillNode> allIdenticalSkills = myPlayerWebLink.GetSkillNodes("My Skill");
```

To get the first skill with a specific ID (`int`) or name (`string`), use the `GetSkillNode` method.

```csharp
SkillNode mySkillNode = myPlayerWebLink.GetSkillNode("My Skill");
```

## Events

| Name       | Type       | Description                                             |
| ---------- | ---------- | ------------------------------------------------------- |
| onLinked   | UnityEvent | A callback for when the PlayerWebLink is linked.        |
| onUnlinked | UnityEvent | A callback for when the PlayerWebLink becomes unlinked. |
