Class TutorialContainer
A tutorial container is a collection of tutorial content, and is used to access the actual tutorials in the project.
Inherited Members
Namespace: Unity.Tutorials.Core.Editor
Assembly: Unity.Tutorials.Core.Editor.dll
Syntax
public class TutorialContainer : ScriptableObject
Remarks
A tutorial container can be two things:
- Tutorial project (null Parent): a root container which is the entry point for tutorial content in the project.
- Tutorial category (non-null Parent): a set of tutorials that are a part of some other container
Fields
BackgroundImage
Background texture for the card/header.
Declaration
[FormerlySerializedAs("HeaderBackground")]
public Texture2D BackgroundImage
Field Value
Type | Description |
---|---|
Texture2D |
Description
Used as the tooltip for the container card.
Declaration
[Tooltip("Used as the tooltip for the card.")]
public LocalizableString Description
Field Value
Type | Description |
---|---|
Localizable |
Modified
Raised when any field of this container is modified.
Declaration
public TutorialContainerEvent Modified
Field Value
Type | Description |
---|---|
Tutorial |
Remarks
If 'this' container is parented, we consider modifications to 'this' container also to be modifications of the parent.
OrderInView
This value determines the position of a container / container card within a container, if this container is shown as a card.
Declaration
[Tooltip("This value determines the position of a container / container card within a container, if this container is shown as a card.")]
public int OrderInView
Field Value
Type | Description |
---|---|
int |
ParentContainer
By setting another container as a parent, this container becomes a tutorial category in the parent container.
Declaration
[Tooltip("By setting another container as a parent, this container becomes a tutorial category in the parent container.")]
public TutorialContainer ParentContainer
Field Value
Type | Description |
---|---|
Tutorial |
ProjectLayout
Can be used to override or disable (the default behavior) the default project layout specified by the Tutorial Framework.
Declaration
[Tooltip("Can be used to override or disable (the default behavior) the default project layout specified by the Tutorial Framework.")]
public Object ProjectLayout
Field Value
Type | Description |
---|---|
Object |
Sections
Sections (tutorial or link card) of this container.
Declaration
[NonReorderable]
public TutorialContainer.Section[] Sections
Field Value
Type | Description |
---|---|
Section[] |
Subtitle
Subtitle shown in the container card and header area.
Declaration
[Tooltip("Subtitle shown in the card/header.")]
public LocalizableString Subtitle
Field Value
Type | Description |
---|---|
Localizable |
Title
Title shown in the card/header.
Declaration
[Tooltip("Title shown in the card/header.")]
public LocalizableString Title
Field Value
Type | Description |
---|---|
Localizable |
TutorialContainerModified
Raised when any TutorialContainer is modified.
Declaration
public static TutorialContainerEvent TutorialContainerModified
Field Value
Type | Description |
---|---|
Tutorial |
Remarks
Raised before Modified event.
Properties
ProjectLayoutPath
Returns the path for the ProjectLayout, relative to the project folder, or a default tutorial layout path if ProjectLayout not specified.
Declaration
public string ProjectLayoutPath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetCompletionRate()
Return a number between 0.0 and 1.0 that is the number of tutorials in that containers that are completed. Tutorials that don't have tracking enable always count as completed
Declaration
public float GetCompletionRate()
Returns
Type | Description |
---|---|
float | The percentage of tutorials completed, as a number between 0.0 and 1.0 |
HighlightTutorialWindow()
This will highlight the Tutorial Window. Can be used by the Welcome Dialog to Highlight tutorials when exited
Declaration
public void HighlightTutorialWindow()
LoadTutorialProjectLayout()
Loads the tutorial project layout
Declaration
public void LoadTutorialProjectLayout()
RaiseModified()
Raises the Modified events for this asset.
Declaration
public void RaiseModified()