Skip to main content

StepInstance

A class in Root.Township, ATT.MicroTutorial.

One running step of a micro tutorial on the client: makes a step object with static and dynamic content folders and spawns the step's static content.

Constructors​

MemberWhat it is
StepInstance(MicroTutorialStep step, Transform parent)Creates a StepInstance from step and parent.
protected StepInstance(MicroTutorialStep step)Creates a StepInstance from step and parent.

Fields​

MemberWhat it is
protected Transform dynamicContentTransformFolder for the step's dynamic content.
protected bool isSpawnedTrue while the static content is spawned.
protected readonly MicroTutorialStep stepThe step's settings asset.
3 private and internal fields
MemberWhat it is
private static readonly MicroTutorialLogger loggerMicro tutorial logger for this class.
private GameObject staticContentThe instantiated static content prefab.
private Transform staticContentTransformThe "Static Content" child the static content is spawned under.

Properties​

MemberWhat it is
string Name { get; }The step's name.
MicroTutorialStep Settings { get; }The step's settings asset.

Methods​

MemberWhat it is
void DespawnStaticContent()Destroys the step's static content if it is spawned.
async void SpawnAdditionalStaticContent()Has every AdditionalStaticContent under the dynamic content spawn its content.
override string ToString()The step asset name, for logs.
protected void InitializeHierarchy(Transform parent)Creates the step's object under the parent with "Static Content" and "Dynamic Content" children.
protected void SpawnStaticStepContent()Instantiates the step's static content prefab, if it has one and it isn't spawned yet.