# Tutorial Module System

{% file src="<https://1613353771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fygjewtla1W7kzTTIpGWq%2Fuploads%2FoF4j5sW4hL4hkAmdvITE%2Fv1.0.8%20Tutorial%20Module%20System%20(Alchemy).unitypackage?alt=media&token=ec6da987-5d5b-4814-8bd9-b25a1fc6ef68>" %}
Package (DOTween support)
{% endfile %}

{% file src="<https://1613353771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fygjewtla1W7kzTTIpGWq%2Fuploads%2F4KRbuCsQCQKPPsqLaVlS%2Fv1.0.8%20Tutorial%20Module%20System%20(Alchemy%2C%20PrimeTween).unitypackage?alt=media&token=89e567c4-229f-48ea-8109-0bb3c340249e>" %}
Package (PrimeTween support)
{% endfile %}

## How to use

Replace TutorialManager prefab on scene, where you want to use it. You can unpack prefab on scene if you want.

<figure><img src="https://1613353771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fygjewtla1W7kzTTIpGWq%2Fuploads%2FiDxxuYhZszsmOEsKOsEC%2Fimage.png?alt=media&#x26;token=85c3f949-d766-41e5-9e88-9489b5ef48ee" alt=""><figcaption><p>How it looks in the inspector</p></figcaption></figure>

* *<mark style="color:purple;">**Tutorials**</mark>* is list of all tutorials in this scene. You can reference them, or leave list empty, there is several methods how to start tutorial, that will be written later.
* *<mark style="color:purple;">**Scene References**</mark>* is Dictionary where key is your unique name for object in scene and value is object reference itself. <mark style="color:red;">**It's important to write unique and readable key for each object because it will be use often in Tutorial Config setup.**</mark>
* *<mark style="color:purple;">**Other properties**</mark>* are references for core tutorial module system prefabs and components that not important to change.
* *<mark style="color:purple;">**TestRunTutorial**</mark>* is button for test purposes, you can select Tutorial object and test it by clicking Invoke button.

### Let's create tutorial

Create ScriptableObject of Tutorial - Go to Create->Game->Tutorials->Tutorial:

<figure><img src="https://1613353771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fygjewtla1W7kzTTIpGWq%2Fuploads%2Fz6meknawgtMhXmsMxK9z%2Fimage.png?alt=media&#x26;token=5f82af78-52b2-4dd8-b617-521c60890231" alt=""><figcaption><p>Tutorial object create path</p></figcaption></figure>

When it be will created you can open it. How it looks:

<figure><img src="https://1613353771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fygjewtla1W7kzTTIpGWq%2Fuploads%2FpUNW4X26HlDYFPgZUfV8%2Fimage.png?alt=media&#x26;token=354a4a0a-6db3-4fda-be7a-9122d42c94cd" alt=""><figcaption><p>Content of Tutorial object in the inspector</p></figcaption></figure>

* ***Id*** is unique identifier for each tutorial. For example 'FirstFlow\_LevelReward' is Id name for this tutorial. Further, you can run this tutorial by Id or Tutorial object itself with TutorialManager.Instance methods.
* ***Show Only Once*** is checker that will ignore tutorial start if it was completed before.
* ***Send To Analytics*** is checker to handle Tutorial completed events in your analytics SDK. You may want to send only few tutorials in analytics. You need to check if it's true in your analytics implementation.
* ***Next Auto Run Tutorial*** is another tutorial object reference that will run automaticaly on this tutorial complete. You can leave it empty so no tutorial will run automaticaly after this.
* ***Steps*** is core list of actions in whole tutorial. This is core part of tutorial system where you will setup needed tools.

Guide WIP...

Below is list of tools that you can select in Tutorial step.\
Column with name "**Multiple**" means that tool can be used several times per step\
Column with name "**Follow**" means that tool can follow world or screen space object&#x20;

<table><thead><tr><th width="126">Tool</th><th width="408">What for</th><th width="94" data-type="checkbox">Multiple</th><th data-type="checkbox">Follow</th></tr></thead><tbody><tr><td>TextUI</td><td>Display text on object or at screen position</td><td>true</td><td>true</td></tr><tr><td>FingerUI</td><td>Finger with animation on object or at screen position</td><td>false</td><td>true</td></tr><tr><td>Invisible<br>Linked<br>Button</td><td>Force player press referenced button. Used with "Tap On Button" tutorial step as finish condition</td><td>false</td><td>true</td></tr><tr><td>Attention Mask</td><td>Fullscreen darken with mask on object or fullscreen darken only (suppored only rectangle mask)</td><td>true</td><td>true</td></tr><tr><td>ArrowUI</td><td>Display arrow with animation on object or at screen position</td><td>true</td><td>true</td></tr><tr><td>TempUI<br>Object</td><td>Creates object for 1 step and destroys it on complete</td><td>true</td><td>false</td></tr><tr><td>UIObject<br>Parent<br>Change</td><td>Moves an object for 1 step under Tutorial canvas. Use-case: show UI object above attention mask.<br>Toggle on Follow Old Parent Transform if old parent moves</td><td>true</td><td>true</td></tr></tbody></table>
