Class InstructionsParagraph
A paragraph of a TutorialPage used to display a series of instructions. The block will initially show a blue icon, then a green checkmark when the instructions are performed. The success state is evaluated using the paragraph's Criterias().
Inherited Members
Namespace: Unity.Tutorials.Editor.Paragraphs
Assembly: Unity.Tutorials.Editor.dll
Syntax
public class InstructionsParagraph : ParagraphBase
Fields
Text
The text that makes the paragraph.
Declaration
[LocalizableTextArea(3, 15)]
public LocalizableString Text
Field Value
| Type | Description |
|---|---|
| LocalizableString |
Title
The title displayed at the top of the paragraph.
Declaration
public LocalizableString Title
Field Value
| Type | Description |
|---|---|
| LocalizableString |
Properties
Criteria
The completion criteria if this paragraph's type is Instruction.
Declaration
public IEnumerable<TypedCriterion> Criteria { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TypedCriterion> |
Methods
CanMask()
Override to return true when inheriting from this class, if the Paragraph type can mask the editor. MaskSetting will be used for that paragraph type.
Declaration
public override bool CanMask()
Returns
| Type | Description |
|---|---|
| bool | If true, this paragraph provide MaskSettings to be applied. |
Overrides
Criterias()
List of criteria to satisfy in order to complete the paragraph.
Declaration
public override TypedCriterionCollection Criterias()
Returns
| Type | Description |
|---|---|
| TypedCriterionCollection | The criteria list. |
Overrides
GetDisplayRoot()
Creates the VisualElement representing the paragraph for usage in the Tutorials window. To customise how the Paragraph appears in the Inspector of its TutorialPage SO, use a custom PropertyDrawer.
Declaration
public override VisualElement GetDisplayRoot()
Returns
| Type | Description |
|---|---|
| VisualElement | The VisualElement that contains the paragraph. |
Overrides
HasCriteria()
Whether the paragraph type has criterias that need to be satisfied to complete the instructions.
Declaration
public override bool HasCriteria()
Returns
| Type | Description |
|---|---|
| bool | If the paragraph has criterias at all. |
Overrides
IsCompleted()
Returns whether the paragraph has been completed.
Declaration
public override bool IsCompleted()
Returns
| Type | Description |
|---|---|
| bool | The paragraph completion state. |
Overrides
OnCriterionUpdated()
Callback that fires when one of the criteria has been updated.
Declaration
public override void OnCriterionUpdated()