> For the complete documentation index, see [llms.txt](https://mandor-labs.gitbook.io/mandor-labs-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandor-labs.gitbook.io/mandor-labs-docs/achievement/getting-started/quickstart.md).

# Quickstart

## Steps

{% stepper %}
{% step %}

#### Create Custom Achievement Tracker

This example show you how to create simple achievement tracker

```csharp
[Serializable]
public class AchievementCoinTracker : AchievementTracker , EventListener<CoinEvent>
{
    public int coinToCollect;

    public override string name => "Coin Tracker";
    public override string description => "Collect coins";
    public override int totalProgress => coinToCollect;

    protected override void StartTracking()
    {
        this.RegisterEvent();
    }
    protected override void StopTracking()
    {
        this.UnregisterEvent();
    }

    public void OnEvent(object sender, CoinEvent e)
    {
        switch (e.type)
        {
            case CoinEvent.Type.GetCoin:
                {
                    //increment current progress
                    currentProgress++;
                    break;
                }
        }
    }
}
```

{% endstep %}

{% step %}

#### Create Achievement Asset

In this step you will create **Achievement Asset** and assign tracker that we already create on previous step.

1. Right click on project window **Create** :arrow\_right: **Modular Labs** :arrow\_right: **Achievement.**
2. Assign tracker with tracker that we already create on previous step.

<div data-with-frame="true"><figure><img src="/files/qkRNsK9qEBsdMVPAPpIt" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Setup Achievement Database

Before you can use this system you need to setup **Achievement Database** to register your **Achievement.**

1. Create empty game object and add component **Achievement Database.**
2. Assign all **Achievement** into this component.

<div data-with-frame="true"><figure><img src="/files/McygcQixgFLeLqgnpoI9" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Setup Save Load System

This step will guide you to setup save load system.

1. Create **Save Load Handler Asset** and assign handler to **AchievementSaveLoadFileHander**. You can create asset by Right click on project window and choose **Create** :arrow\_right: **Modular Labs** :arrow\_right: **Save Load** :arrow\_right: **Handler .**

<div data-with-frame="true"><figure><img src="/files/4nK42lyhQ2cC5oHIXJkl" alt=""><figcaption></figcaption></figure></div>

2. Create save load configuration to register your previous handler asset. To create save load config you can right click on project window and choose **Create** :arrow\_right: **Modular Labs** :arrow\_right: **Save Load** :arrow\_right: **Config .**

<div data-with-frame="true"><figure><img src="/files/JIQsYgTd1gmbjnBcd9Am" alt=""><figcaption></figcaption></figure></div>

3. Create empty game object and add component **Save Load Database.**
4. Assign previous **Save Load Config Asset** into this component.

<div data-with-frame="true"><figure><img src="/files/dgNfDNvGTDfD4MgOSv6c" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### Press Play

Now you can press play on unity editor and check to **Achievement Explorer** to make sure your **Achievement** is registered.

You can access this explorer from **Tools** :arrow\_right: **Modular Labs** :arrow\_right: **Achievement**

<div data-with-frame="true"><figure><img src="/files/lT86DP6qWYzwboUyaLx6" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mandor-labs.gitbook.io/mandor-labs-docs/achievement/getting-started/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
