Automatic Tutorial Maker: in-game tips
  • AUTOMATIC TUTORIAL MAKER DOCS 🔰
  • ⚙️ Unity Asset Store Page
  • ▶️ Official YouTube playlist
  • 🤝 Discord support
  • ⚡Extra Short Guide
  • DATA
    • Core Components
    • Supported Input
    • Supported Input (Joystick)
    • Supported Languages
    • Supported Visuals (UI)
    • Supported Visuals (World)
    • Visuals Prefabs
  • Usage Guide
    • Setup
    • Tutorial Creation
    • Step Customization
    • Advanced: Creating Visual Prefab
    • Advanced: Manual Step Calls
    • Advanced: Localization
    • Advanced: Adaptive Tutorial
    • Tutorials Gallery
  • Additional
  • HELP
    • Prompting & PDF
    • Contacts
Powered by GitBook
On this page
  1. Usage Guide

Advanced: Adaptive Tutorial

Switching tutorial design between devices.

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.

  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.

PreviousAdvanced: LocalizationNextTutorials Gallery

Last updated 2 months ago