Class Tutorial
A container for tutorial pages which implement the tutorial's functionality.
Inherited Members
Namespace: Unity.Tutorials.Core.Editor
Syntax
public class Tutorial : ScriptableObject, ISerializationCallbackReceiver
Fields
Completed
Raised after this tutorial has been completed.
Declaration
public TutorialEvent Completed
Field Value
Type | Description |
---|---|
TutorialEvent |
Remarks
This even is raised repeatedly when, for example, going back and forth between the second-to-last and last page, and the last page has its possible criteria completed.
GoingBack
Raised when we are going back to the previous page.
Declaration
public GoingBackEvent GoingBack
Field Value
Type | Description |
---|---|
GoingBackEvent |
Initiated
Raised after this tutorial has been initiated.
Declaration
public TutorialEvent Initiated
Field Value
Type | Description |
---|---|
TutorialEvent |
Modified
Raised when this tutorial is modified.
Declaration
public TutorialEvent Modified
Field Value
Type | Description |
---|---|
TutorialEvent |
PageInitiated
Raised after a page of this tutorial has been initiated.
Declaration
public PageInitiatedEvent PageInitiated
Field Value
Type | Description |
---|---|
PageInitiatedEvent |
Quit
Raised when this tutorial is quit at any point. Quit is signaled always, whether the tutorial is quit by closing the tutorial,\ completing the tutorial or by proceeding to the next tutorial.
Declaration
public TutorialEvent Quit
Field Value
Type | Description |
---|---|
TutorialEvent |
TutorialModified
Raised when any tutorial is modified.
Declaration
public static TutorialEvent TutorialModified
Field Value
Type | Description |
---|---|
TutorialEvent |
TutorialTitle
The title shown in the window.
Declaration
public LocalizableString TutorialTitle
Field Value
Type | Description |
---|---|
LocalizableString |
Properties
CurrentPage
Returns the current page.
Declaration
public TutorialPage CurrentPage { get; }
Property Value
Type | Description |
---|---|
TutorialPage |
CurrentPageIndex
The current page index.
Declaration
public int CurrentPageIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |
DefaultSceneCameraSettings
Scene view camera settings to be applied when the tutorial starts.
Declaration
public SceneViewCameraSettings DefaultSceneCameraSettings { get; set; }
Property Value
Type | Description |
---|---|
SceneViewCameraSettings |
IsAutoCompleting
Are we currently auto-completing?
Declaration
public bool IsAutoCompleting { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsCompleted
Is the tutorial completed? A tutorial is considered to be completed when we have reached its last page and possible criteria on the last page are completed.
Declaration
public bool IsCompleted { get; }
Property Value
Type | Description |
---|---|
Boolean |
LessonId
Lessond ID used for progress tracking. Typically there's no need to alter this value manually, instead use the ProgressTrackingEnabled property (a GUID will be generated automatically).
Declaration
public string LessonId { get; set; }
Property Value
Type | Description |
---|---|
String |
PageCount
The page count of the tutorial.
Declaration
public int PageCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Pages
All the pages of this tutorial.
Declaration
public IEnumerable<TutorialPage> Pages { get; }
Property Value
Type | Description |
---|---|
IEnumerable<TutorialPage> |
ProgressTrackingEnabled
Enables progress tracking and completion checkmarks for this tutorial.
Declaration
public bool ProgressTrackingEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
SceneManagementBehavior
Scene management behavior at the start of a tutorial.
Declaration
public Tutorial.SceneManagementBehaviorType SceneManagementBehavior { get; set; }
Property Value
Type | Description |
---|---|
Tutorial.SceneManagementBehaviorType |
Remarks
Applicable when no Scenes are specified.
Scenes
Scenes to be loaded when the tutorial starts, if any.
Declaration
public SceneAsset[] Scenes { get; set; }
Property Value
Type | Description |
---|---|
SceneAsset[] |
Remarks
The first scene is the main scene, the rest are loaded as additive scenes.
Skipped
Is this tutorial being skipped currently.
Declaration
public bool Skipped { get; }
Property Value
Type | Description |
---|---|
Boolean |
Version
Tutorial version, arbitrary string, typically integers are used.
Declaration
public string Version { get; set; }
Property Value
Type | Description |
---|---|
String |
WindowLayout
The layout used by the tutorial
Declaration
public Object WindowLayout { get; set; }
Property Value
Type | Description |
---|---|
Object |
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()
Goes to the previous tutorial page.
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
RaiseModified()
Raises the Modified events for this asset.
Declaration
public void RaiseModified()
SkipToLastPage()
Skips to the last page of the tutorial.
Declaration
public void SkipToLastPage()
StartAutoCompletion()
Starts auto-completion of this tutorial.
Declaration
public void StartAutoCompletion()
StopAutoCompletion()
Stops auto-completion of this tutorial.
Declaration
public void StopAutoCompletion()
StopTutorial()
Stops this tutorial, meaning its completion requirements are removed.
Declaration
public void StopTutorial()
TryGoToNextPage()
Attempts to go to the next tutorial page.
Declaration
public bool TryGoToNextPage()
Returns
Type | Description |
---|---|
Boolean | true if we proceeded to the next page, false in any other case. |