Class Tutorial
A container for tutorial pages which implement the tutorial's functionality.
Syntax
public class Tutorial : ScriptableObject, ISerializationCallbackReceiver
Constructors
Tutorial()
Declaration
Fields
TutorialTitle
The title shown in the window.
Declaration
[Header("Content")]
public LocalizableString TutorialTitle
Field Value
Properties
assetSelectedOnExit
Declaration
[Obsolete]
public Object assetSelectedOnExit { get; set; }
Property Value
completed
Declaration
public bool completed { get; }
Property Value
completedPage
Declaration
[Obsolete]
public TutorialWelcomePage completedPage { get; }
Property Value
currentPage
Declaration
public TutorialPage currentPage { get; }
Property Value
currentPageIndex
Declaration
public int currentPageIndex { get; }
Property Value
exitBehavior
How should the tutorial behave upon exiting.
Declaration
public Tutorial.ExitBehavior exitBehavior { get; set; }
Property Value
isAutoCompleting
Declaration
public bool isAutoCompleting { get; }
Property Value
lessonId
Lessond ID, arbitrary string, typically integers are used.
Declaration
public string lessonId { get; set; }
Property Value
pageCount
Declaration
public int pageCount { get; }
Property Value
pages
All the pages of this tutorial.
Declaration
public IEnumerable<TutorialPage> pages { get; }
Property Value
skipped
Is this being skipped currently.
Declaration
public bool skipped { get; }
Property Value
skipTutorialBehavior
How should the tutorial behave upon skipping.
Declaration
public Tutorial.SkipTutorialBehavior skipTutorialBehavior { get; set; }
Property Value
tutorialTitle
deprecated, use TutorialTitle
Declaration
[Obsolete]
public string tutorialTitle { get; set; }
Property Value
version
Tutorial version, arbitrary string, typically integers are used.
Declaration
public string version { get; set; }
Property Value
welcomePage
Declaration
[Obsolete]
public TutorialWelcomePage welcomePage { get; }
Property Value
WindowLayout
The layout used by the tutorial
Declaration
public Object WindowLayout { get; set; }
Property Value
Methods
AddPage(TutorialPage)
Adds a page to the tutorial
Declaration
public void AddPage(TutorialPage tutorialPage)
Parameters
Type |
Name |
Description |
TutorialPage |
tutorialPage |
The page to be added
|
GoToPreviousPage()
Declaration
public void GoToPreviousPage()
OnAfterDeserialize()
UnityEngine.ISerializationCallbackReceiver override, do not call.
Declaration
public void OnAfterDeserialize()
Implements
OnBeforeSerialize()
UnityEngine.ISerializationCallbackReceiver override, do not call.
Declaration
public void OnBeforeSerialize()
Implements
OnGoingBack(TutorialPage)
Declaration
protected virtual void OnGoingBack(TutorialPage page)
Parameters
OnPageInitiated(TutorialPage, Int32)
Declaration
protected virtual void OnPageInitiated(TutorialPage page, int index)
Parameters
OnTutorialCompleted(Boolean)
Declaration
protected virtual void OnTutorialCompleted(bool exitTutorial)
Parameters
Type |
Name |
Description |
Boolean |
exitTutorial |
|
OnTutorialInitiated()
Declaration
protected virtual void OnTutorialInitiated()
RaiseTutorialModifiedEvent()
Raises the Modified events for this asset.
Declaration
public void RaiseTutorialModifiedEvent()
RaiseTutorialPagesModified()
TODO 2.0 merge with RaiseTutorialModified?
Declaration
public void RaiseTutorialPagesModified()
SkipToLastPage()
Declaration
public void SkipToLastPage()
StartAutoCompletion()
Declaration
public void StartAutoCompletion()
StopAutoCompletion()
Declaration
public void StopAutoCompletion()
StopTutorial()
Declaration
public void StopTutorial()
TryGoToNextPage()
Declaration
public bool TryGoToNextPage()
Returns
Events
goingBack
Raised when we are going back to the previous page.
Declaration
public event Action<TutorialPage> goingBack
Event Type
pageInitiated
Raised when a page of this tutorial is being initiated.
Declaration
public event Action<TutorialPage, int> pageInitiated
Event Type
tutorialCompleted
Raised when this tutorial is completed.
Declaration
public event Action<bool> tutorialCompleted
Event Type
tutorialInitiated
Raised when this tutorial is being initiated.
Declaration
public event Action tutorialInitiated
Event Type
TutorialModified
Raised when any tutorial is modified.
Declaration
public static event Action<Tutorial> TutorialModified
Event Type
tutorialPagesModified
Raised when any page of any tutorial tutorial is modified.
Declaration
public static event Action<Tutorial> tutorialPagesModified
Event Type