Search Unity

Tutorial Master 2 - Effortlessly Create Interactive UI Tutorials

Discussion in 'Assets and Asset Store' started by elmar1028, Aug 2, 2016.

  1. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    It should be able to since mouse click is recognized as a finger tap on mobile devices.
     
    jGate99 likes this.
  2. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    @elmar1028

    1- Please add support for ignore the size for popup module, this way i can use vertical layout and contentsize fitter (fixed width, but variable height) to make popups that looks good based on text.

    2- Another must have feature is ability to skip a Stage, for example in my game some levels will require an additional stage in middle. so what i can do is define 5 stages, and skip 3rd if its easy level otherwise show all.
     
    Last edited: Feb 28, 2019
  3. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Could you elaborate more on that? Normally, the modules are positioned based on its size which is calculated at runtime. Or does it behave differently?

    This would require a bit code logic, but you can disable/enable stages based on a set of conditions (so which level to play) that are checked before tutorial begins.
     
  4. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    As you can see it has extra space, and i check the popup prefab. it doesnt seem to use vertical layout.

    I want popup height to not have extra space
     

    Attached Files:

  5. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    Can you please give me high level view of how should i approach it? For example i want to:
    - Skip a Stage (im thinking of removing that stage from the stages list when skiping and adding when needed)

    - How do i reshow a stage. As my game is 2d grid based and each cell could be a solution or not and grid can be up to 25x25, which means i cant make 25x25 stages to do the same thing. So Reshowing same stage (changing its data on runtime) will let me use same stage again n again. How should i approach it? (One workaround im thinking is decrementing that currentStageIndex and then calling next Stage which will show the same stage)

    - How do i start a tutorial from a given stage so i can resume a stage.
     
  6. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Ah! You can create your own modules and set it up your way!
    1. Create your own Pop-Up (e.g., panel with text in it)
    2. Attach a "PopUp Module Text" component to it.
    3. Assign missing fields to it.
    4. Make a prefab out of it
    5. Drag a prefab from the Assets folder into "Pooling Settings" of Tutorial Master Manager component.
    6. And you're done!

    You don't have to delete and re-add stages. You can disable them and they'll be skipped and enable them on a second run.

    You won't be able to decrement a CurrentStageIndex because it can't be modified from outside. You can use functions like JumpStage(int stageIndex) or PrevStage() to re-visit a stage.
     
    jGate99 likes this.
  7. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    Im making good progress, thanks to you.

    Btw, popup is not modal because if you click on some button then both buttton and and next stage triggers.
     
  8. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Ah yes. That is to be expected since it checks if mouse was clicked and if button was clicked.
    • What action do you want to do whenever you click anywhere?
    • What action do you want to do when you click a pop-up?
     
  9. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    i want trigger to go next stage, you already show a popup, so adding a full rectransform that covers whole target canvas will block the clicks and only next stage will appear if modal is true.
     
  10. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Right, but what do you want to achieve when user clicks a pop-up button?
     
  11. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    Good question, which also means you should expose two triggers
    - one for when user click behind the popup or on popup
    - one when user click on popup buttons

    This way we can achieve multiple combinations like quit the tutorial if click behind, or go to next stage click behind etc.

    Just like Modules Prefab, we should also have this modal prefab, so we ca customize if we want to darken the ui or something else
     
  12. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Ah, I see what you mean now!

    The modal pop-up is still doable by adding a dark panel surrounding the popup as you said with its own click event.

    A nice suggestion is to be able to have multiple triggers instead of a single one.
     
    jGate99 likes this.
  13. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    I for now handled it myself by putting this blockeroutside of popup and enable disable on tutorial start end events.

    Can you please add call function Trigger Type, using Unity Event Invoke requires lots of extra steps.
     
  14. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Do you mean invoking a trigger action through API call?
     
  15. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    Sorry for the confusion, i meant add a trigger type for calling a function direction, similar to unity event invoke, but instead of taking event it will take a function, just like UGUI button click event takes.
    https://support.hardcodelab.com/tutorial-master/2.0/trigger
     
  16. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    So you mean have trigger subscribe to C# Events?
     
  17. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    Oops, i can get this behavour from Trigger Activation.
    Sorry for the confusion, all done now :)

    Now only waiting for that modal thing feature, meanwhile im gonna review the product
     
  18. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Thank you for your review!

    Could you describe what do you want to see in a modal pop-up? As in, how would it operate differently from a normal pop-up? I want to understand the scope of the feature you're requesting here.
     
    jGate99 likes this.
  19. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Tutorial Master 2.0.4 Patch Notes

    Bug Fixes
    • Fixed a bug that would prevent Effects from being added to Modules
    • Fixed an issue when UnityEvent Invoker trigger wouldn’t update properly

    Found a bug, or have any questions? Be sure to check out the support section or send an email to support@hardcodelab.com

    To see currently open issues, see the issues page.

    To see previous patch notes, visit the official website.
     
  20. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    User is able to assign prefab for modal background (fully stretched).

    When we click outside of popup, modal picks the click event and we can define a handler
    ==

    for popup, we have a different click handler for its button

    ===

    Please also add StartTutorial(tutorialID, stageIndex) so we can start from a different stage.
     
    elmar1028 likes this.
  21. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Right. Now I understand!

    I am working on additional set of API functions (including what you requested) to have more degree of control over Tutorial Master through C#. Programmers are users too after all ;)
     
    jGate99 likes this.
  22. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    Thanks a lot
     
  23. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    44
    Hey,

    Trying to use this but it seems to struggle when the canvas is the child of another object in the scene. I'm using a storyboard plugin that uses canvases as a child in a hierarchy. When I try to run a tutorial I get this error:



    MissingComponentException: There is no 'RectTransform' attached to the "Parent Section Main" game object, but a script is trying to access it.
    You probably need to add a RectTransform to the game object "Parent Section Main". Or your script needs to check if the component is attached before using it.
    UnityEngine.Transform.get_parentInternal () (at /Users/builduser/buildslave/unity/build/Runtime/Transform/ScriptBindings/Transform.bindings.cs:90)
    UnityEngine.Transform.get_parent () (at /Users/builduser/buildslave/unity/build/Runtime/Transform/ScriptBindings/Transform.bindings.cs:79)
    HardCodeLab.TutorialMaster.Module.GetAccuratePosition (UnityEngine.RectTransform target, UnityEngine.Canvas canvas) (at Assets/Tutorial Master/Scripts/Runtime/Modules/Module.cs:209)
    HardCodeLab.TutorialMaster.Module.CalculatePositionFromCanvas () (at Assets/Tutorial Master/Scripts/Runtime/Modules/Module.cs:231)
    HardCodeLab.TutorialMaster.Module.CalculateTransform () (at Assets/Tutorial Master/Scripts/Runtime/Modules/Module.cs:407)
    HardCodeLab.TutorialMaster.Module.Activate (HardCodeLab.TutorialMaster.TutorialMasterManager caller, HardCodeLab.TutorialMaster.ModuleSettings settings, System.String languageKey) (at Assets/Tutorial Master/Scripts/Runtime/Modules/Module.cs:136)
    HardCodeLab.TutorialMaster.ModuleConfig`2[TModule,TSettings].Activate (System.String languageKey) (at Assets/Tutorial Master/Scripts/Data/Modules/Configs/ModuleConfig.cs:72)
    HardCodeLab.TutorialMaster.StageModules.ActivateModule[TConfig,TModule,TSettings] (System.Collections.Generic.IEnumerable`1[T] moduleConfigs, System.String languageKey) (at Assets/Tutorial Master/Scripts/Data/Stage/StageModules.cs:94)
    HardCodeLab.TutorialMaster.StageModules.Activate (System.String languageKey) (at Assets/Tutorial Master/Scripts/Data/Stage/StageModules.cs:58)
    HardCodeLab.TutorialMaster.Stage.Play () (at Assets/Tutorial Master/Scripts/Data/Stage/Stage.cs:85)
    HardCodeLab.TutorialMaster.Tutorial.SetStage (System.Int32 stageIndex) (at Assets/Tutorial Master/Scripts/Data/Tutorial/Tutorial.cs:144)
    HardCodeLab.TutorialMaster.Tutorial.Start () (at Assets/Tutorial Master/Scripts/Data/Tutorial/Tutorial.cs:165)
    HardCodeLab.TutorialMaster.TutorialMasterManager.StartTutorial (System.Int32 tutorialId) (at Assets/Tutorial Master/Scripts/Runtime/Components/TutorialMasterManager.cs:208)
    HardCodeLab.TutorialMaster.TutorialMasterManager.Start () (at Assets/Tutorial Master/Scripts/Runtime/Components/TutorialMasterManager.cs:239)

     
  24. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    44
    Also, is there any way to disable all other UI when using the “highlight” module? So the user can’t interact with any other UI during the tutorial?
     
  25. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    831
    yes, i requested the same feature and modal update is under consideration.
     
  26. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Hi @TillmaniaLtd

    What's the storyboard plug-in that you're using?

    Kind Regards,

    Elmar
     
  27. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    44
  28. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    44
    I just looked at the thread and I don't think the modal update is the same as my request. I'm more interested in the highlight module and preventing interaction with the non-highlighted UI elements... Also, what's the best way to make a tutorial work across multiple scenes?
     
  29. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Hi @TillmaniaLtd

    Thank you. Looking into it...

    I don't have a concrete ETA at the moment unfortunately. I am still working out how to get the modal update implemented.

    The way I would do it:
    • Have a TutorialMasterManager component for each scene
    • Have 1st TutorialMasterManager have a tutorial which represents the first portion of the main tutorial
    • Have 2nd TutorialMasterManager have a tutorial which represents a second portion of the main tutorial
    • When 1st portion of the tutorial has finished playing (I assume player's action would result in new scene being loaded), stop that tutorial (should be done automatically if the last stage has finished playing).
    • When a second scene loads, start a second portion of the main tutorial through second TutorialMasterManager component (can be done by setting Start-Up settings).

    Let me know if you have any questions.

    Kind Regards,

    Elmar
     
  30. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    44
    Ok so Ive solved the modal issue (just a series of tined sprites surrounding the Highlighted object) but activating different stages of the tutorial simply doesnt work. Ive tried the uGUI button click and the stage just doesnt activate. I tried the Unity Event Invoke but it wont let me select the object from the dropdown in the menu. Please advise....
     
  31. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Hi @TillmaniaLtd

    Are you getting any sort of errors? Could you tell me more about how are you trying to activate Stages?

    Kind Regards,

    Elmar
     
  32. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Tutorial Master 2.0.5 Patch Notes

    WARNING: There are code-breaking API changes! UnityEvent changes may be lost and compilation errors may occur

    API Changes
    • Added ActiveStageIndex in TutorialMasterManager Component
    • Added StartTutorial(tutorialIndex, stageIndex) method. Allows you to start a Tutorial at a specific Stage.
    • Added OnTutorialPlay event, which is called after Tutorial started playing.
    • Added OnStagePlay event, which is called after Stage started playing. It passes a Stage object as a parameter.
    • OnStageEnter is now called before the Stage is initialized
    • OnStageEnter passes Stage object as a parameter
    • OnTutorialEnter is now called before Tutorial is initialized
    • OnTutorialEnter passes Tutorial object as a parameter
    • Renamed CurrentTutorialIndex to ActiveTutorialIndex in TutorialMasterManager Component
    • Renamed CurrentStageIndex to ActiveStageIndex in TutorialMasterManager Component

    Improvements

    • Added verbose data validation system. You can read more about it here.

    Bug Fixes
    • [Editor] Fixed a bug when controls wouldn’t be properly updated when changing selected Stage or Tutorial
    • [Runtime] Fixed a bug when using override prefab would lead to errors. Note that you will need to re-assign custom prefabs again.

    Found a bug, or have any questions? Be sure to check out the support section or send an email to support@hardcodelab.com

    To see currently open issues, see the issues page.

    To see previous patch notes, visit the official website.
     
    jGate99 and mindfulmx like this.
  33. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    A quick update, recently, I have re-submitted Tutorial Master to the Asset Store with differently supported unity versions. These versions correspond to the official releases on the Unity Hub since they're the ones users are likely to use.

    Nobody should be affected by it. If anyone is, let me know!
     
  34. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Tutorial Master 2.0.6 Patch Notes

    Aside from bug fixes and improvements, this update brings 29 new API methods to make it easier to modify tutorials at runtime.

    One of the notable additions is the ability to enable/disable data validator. This is useful when some settings are not certain for you until you run a tutorial at runtime. You can disable data validator for the tutorial, for stage or even for modules. For full changes see ‘API Changes’ section.

    Improvements
    • [Runtime] Effects system is now using Coroutines to avoid blockage of other operations
    • [Editor] You can now identify modules' index number from the editor (see image below)

    Bug Fixes
    • [Runtime] Fixed a bug when a Fly-In effect would pass its intended destination
    • [Runtime] Fixed a bug when a Module would be semi-transparent after previous Fade-In effect was interrupted mid-way
    • [Runtime] Fixed a bug when Pop-Up text wouldn't clean up properly after its use
    • [Editor] Fixed an out-of-range exception when deleting the last tutorial from the Tutorial List

    API Changes
    • Added Tutorial.DataValidatorEnabled()
    • Added Stage.DataValidatorEnabled()
    • Added ModuleSetting.DataValidatorEnabled()
    • Added Module.UpdateModulePosition()
    • Added Module.UpdateModulePosition()
    • Added Stage.GetArrowModules()
    • Added Stage.GetHighlighterModules()
    • Added Stage.GetPopupModules()
    • Added Stage.GetImageModules()
    • Added Stage.SetArrowModuleActive()
    • Added Stage.GetArrowModuleActive()
    • Added Stage.GetArrowModuleSettings()
    • Added Stage.GetArrowModuleComponent()
    • Added Stage.UpdateArrowModulePosition()
    • Added Stage.SetImageModuleActive()
    • Added Stage.GetImageModuleActive()
    • Added Stage.GetImageModuleSettings()
    • Added Stage.GetImageModuleComponent()
    • Added Stage.UpdateImageModulePosition()
    • Added Stage.SetHighlighterModuleActive()
    • Added Stage.GetHighlighterModuleActive()
    • Added Stage.GetHighlighterModuleSettings()
    • Added Stage.GetHighlighterModuleComponent()
    • Added Stage.UpdateHighlighterModulePosition()
    • Added Stage.SetPopupModuleActive()
    • Added Stage.GetPopupModuleActive()
    • Added Stage.GetPopupModuleSettings()
    • Added Stage.GetPopupModuleComponent()
    • Added Stage.UpdatePopupModulePosition()

    Found a bug, or have any questions? Be sure to check out the support section or send an email to support@hardcodelab.com

    To see currently open issues, see the issues page.

    To see previous patch notes, visit the official website.
     
  35. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439
    Hi. I would like to create a basic tutorial that would show a dialog box with some text and 3 buttons:

    dialog.PNG


    When the user clicks on a previous/next button, an arrow will point to some UI element and the dialog box will show the corresponding help text for it. At any point the user can click on "Exit Tutorial" to get back to the game.

    I realize that Tutorial Master 2 is much more powerful than required for this type of tutorial, but could you please explain how I can modify your demo_starter scene to achieve this behavior?
     
  36. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    839
    Hi there! :)
    I bought Tutorial Master 2 quite some time ago, but I'm having the chance to use it only right now :)

    I have to develop in synergy with Adventure Creator - is there any chance you could be adding a native integration for such a widespread tool?

    Mostly, it needs wrapping Tutorial Master 2 into AC-usable Actions, to add them to cutscenes and such :)
     
  37. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Hi @username132323232,

    You can simply create your own Pop-Up prefab with these three custom buttons (just the same way you have on a picture).

    There's a minor change you'd need to do, however, in the Assets/Tutorial Master/Scripts/Runtime/Modules/Module.cs

    On line 48, the following variable will be declared:

    Code (CSharp):
    1. protected TutorialMasterManager CallerManager { get; private set; }
    Change its scope to be public, like so:

    Code (CSharp):
    1. public TutorialMasterManager CallerManager { get; private set; }
    This will allow you to access a parent TutorialMasterManager from a currently running Module, which essentially allows you to control the flow of the tutorial (I will make it public in the next update).

    Then, create a separate script which would expose your needed functions to UGUI buttons (null checks not included for brevity):

    Code (CSharp):
    1. using UnityEngine;
    2. using HardCodeLab.TutorialMaster;
    3.  
    4. [RequireComponent(typeof(Module))]
    5. public class ModuleController : MonoBehaviour
    6. {
    7.     private Module _module;
    8.  
    9.     void Awake()
    10.     {
    11.         _module = GetComponent<Module>();
    12.     }
    13.  
    14.     public void NextStage()
    15.     {
    16.         _module.CallerManager.NextStage();
    17.     }
    18.  
    19.     public void PrevStage()
    20.     {
    21.         _module.CallerManager.PrevStage();
    22.     }
    23.  
    24.     public void StopTutorial()
    25.     {
    26.         _module.CallerManager.StopTutorial();
    27.     }
    28. }
    Attach it to your Pop-Up prefab (make sure it's on the same GameObject as PopUpModule component) and have buttons connected to respected public methods.

    Let me know if it works for you :)
     
    username132323232 likes this.
  38. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Hi @NeatWolf

    This is definitely possible. I will check out the Adventure Creator and see what can be wrapped into their Actions framework that you've mentioned.

    Aside from that, since AC supports UGUI I see no reason why it wouldn't work with AC.
     
    NeatWolf likes this.
  39. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439
    Thank you Elmar! I have some questions about your suggestion:

    1) Stage Settings: should I set Trigger Type to none for all stages?

    2) How do I keep the dialog box with the 3 navigation buttons visible during all the stages? I'm just adding it to the Modules list for every stage, but is this the proper way of doing it?

    3) In Module Properties there is a "Show Button" checkbox. What does it do and do I need it for this tutorial?
     
  40. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    1) Yes. Trigger Type should be set to "None" unless you want a user to stop or go to the next stage of the tutorial through other means.

    2) Yes. That's the proper way to do it. If you want that dialog to be visible for all tutorials, it would be much easier to just replace the stock prefab in Module Pooling settings.

    3) The "Show Button" setting should be disabled. This option is for dialog boxes with single buttons. While we're at it, you go to your prefab's Pop-Up Module component and make sure that "Button Label Text" and "Confirmation Button" fields are empty.
     
  41. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439
    So the "Confirmation Button" should be set to some "dummy" button with text label set to an empty string?

    Also, something I missed earlier. We need to control visibility of the "previous" and "next" buttons. Do you have any suggestions?
     
  42. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Not really. The field should be completely empty: no "dummy" button required.

    Depends on what you're trying to achieve? When do you want buttons to be visible? Is it that you would want to hide them on some stages/tutorials?
     
  43. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439
    If I set the field to "none", I get this error:

    [Caller "TMManager" of type "TutorialMasterManager"] Unable to assign click events! Button Component has not been assigned.


    Sorry I wasn't more specific. Let's say there are 5 stages in the tutorial. In stage 1, the button "previous" should be hidden or disabled. In stage 5, the button 5 should be hidden or disabled.
     
  44. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Is that an error or a warning? It shows up as an error. For now, go to Preferences > Tutorial Master and set the logging level to "Errors Only".

    In the ModuleController.cs script (the one from before), you can add the following:

    Code (CSharp):
    1.     public Button NextButton;
    2.     public Button PrevButton;
    3.  
    4.     void Update()
    5.     {
    6.         if (_module == null || !_module.InUse)
    7.             return;
    8.  
    9.         UpdateVisibility();
    10.     }
    11.  
    12.     public void UpdateVisibility()
    13.     {
    14.         var stageCount = _module.CallerManager.ActiveTutorial.Stages.Count;
    15.         var stageIndex = _module.CallerManager.ActiveStageIndex;
    16.  
    17.         NextButton.gameObject.SetActive(stageIndex < stageCount - 1);
    18.         PrevButton.gameObject.SetActive(stageIndex > 0);
    19.     }
    Then assign PrevButton and NextButton fields from the Pop-Up Module prefab and it should work.
     
    username132323232 likes this.
  45. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439
    Sorry, it's indeed a warning. So it's OK to just set logging level to "Errors Only"?

    Your solution works great! It's impressive how flexible this framework is.

    I have some questions about TMM events listed in Tutorial Settings:

    1) What is the difference between "Tutorial Enter" and "Tutorial Start"?

    2) Is it possible to set callback function for "On Tutorial End" using code?

    Thanks.
     
  46. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    1) Tutorial Enter gets invoked as soon as tutorial is set to begin (so as soon as Start() function has been invoked). Tutorial Starts gets invoked after the tutorial has begun after data validation check has occurred. You can read about events here.

    2) Yes. Since it's a UnityEvent, you can do this:

    Code (CSharp):
    1. void Start()
    2. {
    3.     var tutorialManager = GetComponent<TutorialMasterManager>();
    4.     tutorialManager.ActiveTutorial.Events.OnTutorialEnd.AddListener(OnTutorialEnd);
    5. }
    6.  
    7. private void OnTutorialEnd(Tutorial tutorial)
    8. {
    9.     Debug.Log($"{tutorial.Name} has stopped.");
    10. }
    Just be sure to call respective RemoveListener if you plan on destroying a script (or its GameObject) before TutorialMasterManager to avoid memory leaks:

    Code (CSharp):
    1. tutorialManager.ActiveTutorial.Events.OnTutorialEnd.RemoveListener(OnTutorialEnd);
     
    username132323232 likes this.
  47. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439
    Thanks. That worked great!

    Is it possible to set Arrow target (when position mode is transform-based) in runtime? I have some buttons that are dynamically created.
     
  48. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Yep! You can do this:

    Code (CSharp):
    1. public void UpdateArrowPointerExample(RectTransform newTarget)
    2. {
    3.     // if you want to modify arrow module AFTER starting the tutorial, disable data validator
    4.     tutorialManager.Tutorials[0].DataValidatorEnabled = false;
    5.     tutorialManager.StartTutorial();
    6.  
    7.     // get a currently running stage
    8.     var targetStage = tutorialManager.ActiveStage;
    9.  
    10.     // e.g. change the point target of the first Arrow Module on our list
    11.     var arrowModuleSettings = targetStage.GetArrowModuleSettings(0);
    12.  
    13.     // update the point target
    14.     arrowModuleSettings.PointTarget = newTarget;
    15.  
    16.     // this will apply changes you've made to an arrow module
    17.     targetStage.UpdateArrowModulePosition(0);
    18. }
    You can also update settings for other Modules like Pop-Up (done similarly as in the example above).
     
  49. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,172
    Sorry, missed this question. Yes, just set the logging level to "Errors Only"
     
  50. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    439

    I would like to modify arrow targets before tutorial starts. There will be a button "View Tutorial", so there's enough time to assign arrow targets. I found
    Tutorials[0].Stages
    , so if I take that Stages list and iterate over it before the tutorial starts, would that be appropriate? In that case I guess there's no need to call
    DataValidatorEnabled = false
    or
    UpdateArrowModulePosition(0)
    ?