Interactive tutorials

We have developed a module for showing interactable tutorials before the game starts so that users have a better understanding of how to play the actual game.

After developing the Interactive tutorial, you must put it into the asset bundle.

There are 2 ways to create the asset bundle.

1. Prefab based

2. Scene based

If you have used either of the options to create the asset bundle of the game, you also must use the same technique to create the interactive tutorial.

  1. Steps to use prefab-based bundle: - Developer to create a prefab of the complete interactable tutorial (similar to MainParent prefab). - The name of the prefab should be "InteractableTuts". We use this name to load this object from assetbundle. - Put both the prefabs in one folder and create the assetbundle. It should be independent of winzo. You don't have to take any input or data from winzo to run interactable tutorial. Don't use Winzo’s events like “SetUpGame”, ”GameLoaded” and updateScore() because it's not the actual game.

  2. Steps to use scene-based bundle: Create a new scene name called “Tutorial” and develop the interactive tutorial. Put an asset bundle tag to the scene, the tag should be the same for your game scene and this scene. Create the asset bundle.

*Note: To make it run without any issues try to make it independent of your actual game. Write different scripts for it. So that common scripts don't create any issues later. You can have the same scripts but please manage it carefully as the same scripts will run on both (tutorial and game).

Setup for Interactive Tutorial

Create a script (E.g TutorialManager.cs) and use below code to initialize the tutorial.

void Start()
 {
     Dictionary<string, string> scenename = new Dictionary<string,
     string>();#
     scenename.Add("scenename", "MainScene");
     WinzoEventManager.StartListening("SetUpTuts", SetUpTuts);
     WinzoEventManager.TriggerEvent("IntTutsLoaded", scenename);
 }
void SetUpTuts(IDictionary data)
  {
     #region Use this region only when tutorial needed config  data
      Dictionary<string, object> tuteData = new Dictionary<string,
      object>();
      foreach (DictionaryEntry d in data)
      {
          tuteData.Add((string)d.Key, (object)d.Value);
      }
      // Get the config data needed for tutorial
      var difficulty = (int)tuteData["difficulty"];
      #endregion config region ends here SetUpTuts
      // Use this to stop listening
      WinzoEventManager.StopListening("SetUpTuts", SetUpTuts);
  }

Once the tutorial reaches the end and you want to finish the interactive tutorial. Call the following method.

public void FinishTutorial()
  {
      WinzoEventManager.TriggerTutsFinishEvent();
  }

How it works:

  1. We load the interactable tutorial prefab from assetbundle and instantiate it in a scene.

  2. In that scene, we have a canvas which has one button "Skip" and one text "How to Play".

  3. When the user clicks on “Skip” we unload the scene, go to the matchmaking scene and start the game. You do not have to do anything on SKIP. We will handle that on our end.

We have added a few methods for the developer to use in WinzoEventManager.Dll.

The tutorial will end in 2 ways, either by clicking on the skip button or by finishing the interactable tutorial.

You need to call this method to finish the tutorial and after that actual game will start.

"WinzoEventManager.TriggerTutsFinishEvent();" 

It will look like the below snapshot.

Last updated