Last updated
Last updated
Note that when adding the prefab to the canvas and running the project it will not appear immediately, it is necessary to run an instruction for it to appear. Fortunately, there are some handy methods available in the component itself (in the TutorialPopUpManager class) that make this process easier, they are:
ShowTutorial: displays the tutorial popup, playing the video automatically if the configured item is of type Video
CloseTutorial: hides the tutorial popup, pausing the video automatically if the configured item is of type Video
ToggleTutorial: show or hide the tutorial popup according to the current visibility state
SetTutorial(TutorialItem): you don't need to have a popup component for every tutorial you are going to display. Just call the SetTutorial method to change the tutorial to be displayed and then call the ShowTutorial method to open the tutorial popup. Isn't that awesome?! :)
If you need to know via script if the tutorial popup is being displayed or not, just check for the IsShown boolean.
It's important to know that you can also call these methods via Unity Events, if you don't have advanced programming knowledge :)