Skip to content

GuidedTour Configuration

tarikvural edited this page Jan 30, 2022 · 5 revisions

Configuration Files

GuidedTour.json

The configuration file for the GuidedTour system can be found at Assets/GuidedTour/Configuration/GuidedTour.json. The json file contains an array called sections where every section contains a sectionName and an array of tasks. Every task contains the following attributes

  • id Links the task to its corresponding instance in the GuidedTour.unity scene. This option is not requiered, if it is not present, a SimpleTourTask will be created automatically.
  • name The name / title of the task. This attribute references a translation in the lanuage file
  • description The description of the task. As name this also references a translation.
  • action The action which is wanted by the user or if it is a SimpleTourTask the label on the continue button.

Languages.json

The language file is located at Assets/GuidedTour/Configuration/Languages.json. It contains a defaultLanguage and an array of entries. Each entry has a name which follows the syntax identifier:language and a translation attribute which is the string for this identifier and language. The entries listed in the GuidedTour.json must all be listed for each supported language and have their name and description Attributes set.

Creating new Tasks

How you create Tasks depends on the type of Task.

InteractableTourTask.cs

This task requires the user to interact with the scene by pressing a button. The script is located at Assets/GuidedTour/Scripts/TourTasks/InteractableTourTask.cs.

To set up the task, create an empty GameObject and add this script as a component. If the desired button will only be loaded into the scene at runtime via a prefab, then go to it's prefab, and create the GameObject there. In the inspector you will be able to change the following settings:

  • Id -required- Add the Id, you specified for this task in the GuidedTour.json file.
  • Interactable -required- Drag and drop the button-GameObject, that has an Interactable component, into this field.
  • Highlighter Use our GT_HighlighterPrefab or specify your own highlighter, that points towards the button.
  • Is Highlighter Needed You can enable or disable the highlighter for each task individually.
  • Arrow Position Here you can set, from which side the arrow should point towards the button
  • Indicator Offset If want to increase or decrease the distance between the arrow and the button.
  • Input Blocker Prefab Use our InputBlocker prefab or specify your own GameObject that blocks buttons from being pressed.
  • Is Input Blocker Needed You can enable or disable the Input-Blocker for each task individually.
  • Input Blocker Offset If want to change the position of the cube.
  • Input Blocker Scale If want to change the size of the cube.

KeyboardTourTask.cs

This task requires the user to interact with the scene by typing a word into an InputField via a Keyboard. The script is located at Assets/GuidedTour/Scripts/TourTasks/KeyboardTourTask.cs.

To set up the task, create an empty GameObject and add this script as a component. If the desired InputField will only be loaded into the scene at runtime via a prefab, then go to it's prefab, and create the GameObject there. In the inspector you will be able to change the following settings:

  • Id -required- Add the Id, you specified for this task in the GuidedTour.json file.
  • Input Field -required- Drag and drop the InputField-GameObject, that has an Input Field (Script) component, into this field.
  • Target String -required- Specify, which string you would like the user to type with the keyboard.

Clone this wiki locally