> For the complete documentation index, see [llms.txt](https://octanta-studio.gitbook.io/automatic-tutorial-maker-for-unity-in-game-tips/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://octanta-studio.gitbook.io/automatic-tutorial-maker-for-unity-in-game-tips/usage-guide/advanced-adaptive-tutorial.md).

# Advanced: Adaptive Tutorial

If your game is intended for 2+ devices, the hints may differ. For example, a "click" hint is required for PC, while a "touch" hint is needed for mobile. The system supports tutorial adaptation for this.

Each device will require a separate ATM with its own hints. This approach is used to avoid a rigid matching matrix and allows for more flexible customization of hints for different devices.

So, to create an adaptive tutorial for multiple devices:

1. **Add separate TutorialSystem to scene** for each device type (e.g., one for PC, one for mobile).
2. ATMs on the same scene should have **unique** "**currentDeviceATM"** in TSR. For example, a separate "ATM\_Mobile" and a separate "ATM\_Gamepad".
3. **Assign unique hints** to each ATM, tailored for the device. ATMs for different devices are not linked to each other so that tutorials for different devices can consider unique steps and not depend on a rigid matching matrix. It is recommended to write a tutorial for each device separately.
4. Disable **Autostart** in TSR so that a specific ATM does not start automatically without the TurnOnTutorial command. Or leave Autostart enabled, and in one ATM assign **forMobileBuildOnly**, and in the other **forPCBuildOnly**, so that they automatically activate only on the specified devices.
5. To enable/disable a specific ATM, use the methods: TurnOffTutorial, TurnOnTutorial in TSR. For example:

```
[SerializeField] private TutorialSceneReferences tutorialDesktop;
[SerializeField] private TutorialSceneReferences tutorialMobile;
[SerializeField] private TutorialSceneReferences tutorialGamepad;

private TutorialSceneReferences currentTutorial;

// Assuming this returns a string like "Desktop", "Mobile", or "Gamepad"
private void MethodForDeviceDetection()
{ 
    tutorialDesktop?.TurnOffTutorial();
    tutorialMobile?.TurnOffTutorial();    
    tutorialGamepad?.TurnOffTutorial();

    string deviceType = GetDeviceType();

    switch (deviceType)
    {
    case "Desktop":
        currentTutorial = tutorialDesktop;
        break;

    case "Mobile":
        currentTutorial = tutorialMobile;
        break;

    case "Gamepad":
        currentTutorial = tutorialGamepad;
        break;

    default:
        Debug.LogError("Device type not recognized!");
        break;
    }

    // Turn on the selected tutorial only if it's not null
    currentTutorial?.TurnOnTutorial();
}

// Example method to get device type
private string GetDeviceType()
{
if (Input.GetJoystickNames().Length > 0)
    return "Gamepad";
if (Application.isMobilePlatform)
    return "Mobile";
return "Desktop";
}
```

Saving and localization are already adapted for multiple ATMs in the scene and do not require additional configuration. Switching between devices in the middle of game progress may require additional progress synchronization.


---

# 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://octanta-studio.gitbook.io/automatic-tutorial-maker-for-unity-in-game-tips/usage-guide/advanced-adaptive-tutorial.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.
