> 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

Get up and running with the Achievement by following these simple steps.

## 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="https://3264224970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DoTKI51WNZduP7daDNt%2Fuploads%2FscLSsUgC9kgeGKfbyo55%2Fimage.png?alt=media&amp;token=889ec352-84cf-4e75-89a8-2bb2a4538dab" 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="https://3264224970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DoTKI51WNZduP7daDNt%2Fuploads%2F0bVASXHJeY1uMXbiATEj%2Fimage.png?alt=media&amp;token=adcec377-1fe2-4019-a811-f88ac0db7770" 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="https://3264224970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DoTKI51WNZduP7daDNt%2Fuploads%2FMGfXgOoTsb1MMm8FjQtR%2Fimage.png?alt=media&amp;token=c7305463-936d-485d-b313-95e28586f26d" 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="https://3264224970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DoTKI51WNZduP7daDNt%2Fuploads%2FkRhZNep2H8FpYixC27lT%2Fimage.png?alt=media&amp;token=ee622964-f50d-49c0-b8b4-09750bc3b799" 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="https://3264224970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DoTKI51WNZduP7daDNt%2Fuploads%2F95TKmL9A49wN2I7L3v53%2Fimage.png?alt=media&amp;token=c500956d-2565-4e6d-89ec-f9b1564ed5ba" 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="https://3264224970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7DoTKI51WNZduP7daDNt%2Fuploads%2FQOADIXfoG1qyj30O8mnd%2Fimage.png?alt=media&amp;token=a2fe4946-d8f9-489a-abc3-4c77fa296caa" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}
